Change option name and shorthand notations

- `mode_sequence` (`ms`) -> `align` (`a`)
- `stick_to_left` (`<` / `s01`)

This commit does not break backward compatibility.
`mode_sequence` is still allowed.
This commit is contained in:
Junegunn Choi
2014-07-23 22:15:01 +09:00
parent f9a49e441d
commit 2fa6a040f6
5 changed files with 179 additions and 87 deletions

View File

@@ -40,14 +40,21 @@ Expect:
apple;:;;banana :: cake
data ;; exchange:;::format
Execute (shorthand notation of mode_sequence and margin):
Execute (DEPRECATED: shorthand notation of mode_sequence and margin):
%EasyAlign/[:;]\+/mrc*l2r2
Expect:
apple ;:;; banana :: cake
data ;; exchange :;:: format
Execute (deep indentation):
Execute (shorthand notation of align and margin):
%EasyAlign/[:;]\+/arc*l2r2
Expect:
apple ;:;; banana :: cake
data ;; exchange :;:: format
Execute (DEPRECATED: deep indentation):
%EasyAlign/[:;]\+/mrc*l2r2
%EasyAlign*/[:;]\+/idmrl*
@@ -55,6 +62,14 @@ Expect:
apple ;:;; banana :: cake
data ;; exchange :;:: format
Execute (deep indentation):
%EasyAlign/[:;]\+/arc*l2r2
%EasyAlign*/[:;]\+/idarl*
Expect:
apple ;:;; banana :: cake
data ;; exchange :;:: format
Execute (stick_to_left):
%EasyAlign*/[:;]\+/stl1l0dlrm3
@@ -62,6 +77,13 @@ Expect:
apple;:;; banana:: cake
data;; exchange:;:: format
Execute (<):
%EasyAlign*/[:;]\+/<l0dlrm3
Expect:
apple;:;; banana:: cake
data;; exchange:;:: format
Execute (different regular expression):
%EasyAlign*/../{'lm':'<','rm':'>'}

View File

@@ -758,7 +758,7 @@ Expect ruby:
dddddd /= 123
gg <=> ee
Do (Alignment using mode_sequence, delimiter_align):
Do (DEPRECATED: Alignment using mode_sequence, delimiter_align):
vip\<Enter>\<C-O>\<Backspace>cr*\<Enter>\<C-D>=
Expect ruby:
@@ -787,7 +787,37 @@ Expect ruby:
dddddd /= 123
gg <=> ee
Do (mode_sequence starting from 2nd, delimiter_align = center):
Do (Alignment using align, delimiter_align):
vip\<Enter>\<C-A>\<Backspace>cr*\<Enter>\<C-D>=
Expect ruby:
a =
a = 1
bbbb .= 2
ccccccc = 3
ccccccccccccccc
ddd = #
eeee === eee = eee = eee = f
fff = ggg += gg &&= gg
g != hhhhhhhh == # 8
i := 5
i %= 5
i *= 5
j =~ 5
j >= 5
aa => 123
aa <<= 123
aa >>= 123
bbb => 123
c => 1233123
d => 123
dddddd &&= 123
dddddd ||= 123
dddddd /= 123
gg <=> ee
Do (DEPRECATED: mode_sequence starting from 2nd, delimiter_align = center):
vip\<Enter>\<C-O>\<Backspace>rc**\<Enter>\<C-D>\<C-D>2=
Expect ruby:
@@ -816,6 +846,35 @@ Expect ruby:
dddddd /= 123
gg <=> ee
Do (align starting from 2nd, delimiter_align = center):
vip\<Enter>\<C-A>\<Backspace>rc**\<Enter>\<C-D>\<C-D>2=
Expect ruby:
a =
a = 1
bbbb .= 2
ccccccc = 3
ccccccccccccccc
ddd = #
eeee === eee = eee = eee = f
fff = ggg += gg &&= gg
g != hhhhhhhh == # 8
i := 5
i %= 5
i *= 5
j =~ 5
j >= 5
aa => 123
aa <<= 123
aa >>= 123
bbb => 123
c => 1233123
d => 123
dddddd &&= 123
dddddd ||= 123
dddddd /= 123
gg <=> ee
Do (around all =s, do not ignore unmatched):
vip\<Enter>\<C-U>
\<C-L>0\<Enter>