diff --git a/README.md b/README.md index 8dc0c0d..cea6b85 100644 --- a/README.md +++ b/README.md @@ -160,8 +160,8 @@ described in the following sections. | `CTRL-U` | `ignore_unmatched` | 0, 1 | | `CTRL-G` | `ignore_groups` | [], ['String'], ['Comment'], ['String', 'Comment'] | | `CTRL-O` | `mode_sequence` | Input string of `/[lrc]+\*{0,2}/` | -| `` | `stick_to_left` | Set stick_to_left option | -| `` | `stick_to_left` | Unset stick_to_left option | +| `` | `stick_to_left` | Set stick_to_left and set left_margin to zero | +| `` | `stick_to_left` | Unset stick_to_left and set left_margin to one | --- diff --git a/autoload/easy_align.vim b/autoload/easy_align.vim index 8eb1b97..2c84ae3 100644 --- a/autoload/easy_align.vim +++ b/autoload/easy_align.vim @@ -552,8 +552,13 @@ function! s:interactive(modes, sl) let opts['ig'] = s:shift(vals['ignore_groups'], 1) elseif c == "\" let opts['stl'] = 1 + let opts['lm'] = 0 elseif c == "\" let opts['stl'] = 0 + let opts['lm'] = 1 + elseif c == "\" || c == "\" + silent! call remove(opts, 'stl') + silent! call remove(opts, 'lm') elseif ch == "\" let modes = tolower(s:input("Mode sequence: ", get(opts, 'm', mode), a:sl)) if match(modes, '^[lrc]\+\*\{0,2}$') != -1 diff --git a/doc/easy_align.txt b/doc/easy_align.txt index 7d19c7a..c5c589d 100644 --- a/doc/easy_align.txt +++ b/doc/easy_align.txt @@ -86,17 +86,17 @@ While in interactive mode, you can adjust some of the alignment options using special shortcut keys listed below. The meanings of the options will be described in the following sections. -| Key | Option | Values | -| ------- | ---------------- | ------------------------------------------ | -| CTRL-I | indentation | shallow, deep, none, keep | -| CTRL-L | left_margin | Input number or string | -| CTRL-R | right_margin | Input number or string | -| CTRL-D | delimiter_align | left, center, right | -| CTRL-U | ignore_unmatched | 0, 1 | -| CTRL-G | ignore_groups | [], [String], [Comment], [String, Comment] | -| CTRL-O | mode_sequence | Input string of /[lrc]+\*{0,2}/ | -| | stick_to_left | Set stick_to_left option | -| | stick_to_left | Unset stick_to_left option | +| Key | Option | Values | +| ------- | ---------------- | -------------------------------------------- | +| CTRL-I | indentation | shallow, deep, none, keep | +| CTRL-L | left_margin | Input number or string | +| CTRL-R | right_margin | Input number or string | +| CTRL-D | delimiter_align | left, center, right | +| CTRL-U | ignore_unmatched | 0, 1 | +| CTRL-G | ignore_groups | [], [String], [Comment], [String, Comment] | +| CTRL-O | mode_sequence | Input string of /[lrc]+\*{0,2}/ | +| | stick_to_left | Set stick_to_left and set left_margin to 0 | +| | stick_to_left | Unset stick_to_left and set left_margin to 1 | Non-interactive mode