mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-09 10:23:49 -05:00
Unmatched line is NOT ignored on right-justification mode. However this commit makes such a line ignored when the end of the line is highlighted as one of the ignored syntax groups (e.g. Comments or Strings)
654 lines
17 KiB
Plaintext
654 lines
17 KiB
Plaintext
" :source run.vim
|
|
" @a
|
|
|
|
Pa ul Mc Ca rt ne y{ {1 }} 94 2
|
|
Ge or ge Ha rr is on {{ 1} }9 43
|
|
Ri ng o St ar r {{ 1} }9 40
|
|
Pe te Be st {{ 1} }9 41
|
|
|
|
Paul McCartney{{1}}942
|
|
George Harrison {{1}}943
|
|
Ringo Starr {{1}}940
|
|
Pete Best {{1}}941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
| Option | Type | Default | Description |
|
|
| -- | -- | -- | -- |
|
|
| threads | Fixnum | 1 | number of threads in the thread pool |
|
|
| queues | Fixnum | 1 | number of concurrent queues |
|
|
| queue_size | Fixnum | 1000 | size of each queue |
|
|
| interval | Numeric | 0 | dispatcher interval for batch processing |
|
|
| batch | Boolean | false | enables batch processing mode |
|
|
| batch_size | Fixnum | nil | number of maximum items to be assigned at once |
|
|
| logger | Logger | nil | logger instance for debug logs |
|
|
|
|
| Option | Type | Default | Description |
|
|
| -- | -- | -- | -- |
|
|
| threads | Fixnum | 1 | number of threads in the thread pool |
|
|
| queues | Fixnum | 1 | number of concurrent queues |
|
|
| queue_size | Fixnum | 1000 | size of each queue |
|
|
| interval | Numeric | 0 | dispatcher interval for batch processing |
|
|
| batch | Boolean | false | enables batch processing mode |
|
|
| batch_size | Fixnum | nil | number of maximum items to be assigned at once |
|
|
| logger | Logger | nil | logger instance for debug logs |
|
|
|
|
| Option | Type | Default | Description |
|
|
| -- | -- | -- | -- |
|
|
| threads | Fixnum | 1 | number of threads in the thread pool |
|
|
| queues | Fixnum | 1 | number of concurrent queues |
|
|
| queue_size | Fixnum | 1000 | size of each queue |
|
|
| interval | Numeric | 0 | dispatcher interval for batch processing |
|
|
| batch | Boolean | false | enables batch processing mode |
|
|
| batch_size | Fixnum | nil | number of maximum items to be assigned at once |
|
|
| logger | Logger | nil | logger instance for debug logs |
|
|
|
|
aaa, bb, c
|
|
d, eeeeeee
|
|
fffff, gggggggggg,
|
|
h, , ii
|
|
j, , k
|
|
|
|
```ruby
|
|
|
|
a =
|
|
a = 1
|
|
bbbb = 2
|
|
ccccccc = 3
|
|
ccccccccccccccc
|
|
ddd = 4
|
|
eeee === eee = eee = eee=f
|
|
fff = ggg += gg &&= gg
|
|
g != hhhhhhhh == 888
|
|
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
|
|
|
|
a =
|
|
a = 1
|
|
bbbb = 2
|
|
ccccccc = 3
|
|
ccccccccccccccc
|
|
ddd = 4
|
|
eeee === eee = eee = eee = f
|
|
fff = ggg += gg &&= gg
|
|
g != hhhhhhhh == 888
|
|
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
|
|
|
|
a =
|
|
a = 1
|
|
bbbb = 2
|
|
ccccccc = 3
|
|
ccccccccccccccc
|
|
ddd = 4
|
|
eeee === eee = eee = eee = f
|
|
fff = ggg += gg &&= gg
|
|
g != hhhhhhhh == 888
|
|
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
|
|
|
|
a =
|
|
a = 1
|
|
bbbb = 2
|
|
ccccccc = 3
|
|
ccccccccccccccc
|
|
ddd = 4
|
|
eeee === eee = eee = eee=f
|
|
fff = ggg += gg &&= gg
|
|
g != hhhhhhhh == 888
|
|
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
|
|
|
|
options = { :caching => nil,
|
|
:versions => 3,
|
|
"cache=blocks" => false }.merge(options)
|
|
|
|
options = { :caching => nil,
|
|
:versions => 3,
|
|
"cache=blocks" => false }.merge(options)
|
|
|
|
options = { :caching => nil,
|
|
:versions => 3,
|
|
"cache=blocks" => false }.merge(options)
|
|
|
|
apple = 1 # comment not aligned
|
|
banana = 'Gros Michel' # comment 2
|
|
|
|
# let g:easy_align_delimiters = { '#': { 'pattern': '#\+', 'ignores': ['String'] } }
|
|
|
|
apple = 1 # comment not aligned
|
|
apricot = 'DAD' + 'F#AD'
|
|
banana = 'Gros Michel' # comment 2
|
|
|
|
apple = 1 # comment not aligned
|
|
apricot = 'DAD' + 'F#AD'
|
|
banana = 'Gros Michel' # comment 2
|
|
|
|
```
|
|
|
|
```yaml
|
|
|
|
mysql:
|
|
# JDBC driver for MySQL database:
|
|
driver: com.mysql.jdbc.Driver
|
|
# JDBC URL for the connection (jdbc:mysql://HOSTNAME/DATABASE)
|
|
url: jdbc:mysql://localhost/test
|
|
database: test
|
|
"user:pass": r00t:pa55
|
|
|
|
mysql:
|
|
# JDBC driver for MySQL database:
|
|
driver: com.mysql.jdbc.Driver
|
|
# JDBC URL for the connection (jdbc:mysql://HOSTNAME/DATABASE)
|
|
url: jdbc:mysql://localhost/test
|
|
database: test
|
|
"user:pass": r00t:pa55
|
|
|
|
```
|
|
```c
|
|
|
|
/* a */ b = c
|
|
aa >= bb
|
|
// aaa = bbb = cccc
|
|
/* aaaa = */ bbbb === cccc " = dddd = " = eeee
|
|
aaaaa /* bbbbb */ == ccccc /* != eeeee = */ === fffff
|
|
|
|
/* a */ b = c
|
|
aa >= bb
|
|
// aaa = bbb = cccc
|
|
/* aaaa = */ bbbb === cccc " = dddd = " = eeee
|
|
aaaaa /* bbbbb */ == ccccc /* != eeeee = */ === fffff
|
|
|
|
```
|
|
|
|
my_object
|
|
.method1 .chain
|
|
.second_method.call
|
|
.third .call
|
|
.method_4 .execute
|
|
|
|
my_object
|
|
.method1 . chain
|
|
.second_method. call
|
|
.third . call
|
|
.method_4 .execute
|
|
|
|
my_object
|
|
. method1.chain
|
|
.second_method.call
|
|
. third.call
|
|
. method_4.execute
|
|
|
|
my_object
|
|
. method1.chain
|
|
.second_method.call
|
|
. third.call
|
|
. method_4.execute
|
|
|
|
my_object
|
|
. method1. chain
|
|
.second_method. call
|
|
. third. call
|
|
. method_4.execute
|
|
|
|
my_object
|
|
.method1 .chain
|
|
.second_method.call
|
|
.third .call
|
|
.method_4 .execute
|
|
|
|
my_object
|
|
.method1.chain
|
|
.second_method.call
|
|
.third.call
|
|
.method_4.execute
|
|
|
|
my_object .
|
|
method1 .chain.
|
|
second_method.call.
|
|
third .call.
|
|
method_4 .execute
|
|
|
|
| Option | Type | Default | Description |
|
|
| -- | -- | -- | -- |
|
|
| threads | Fixnum | 1 | number of threads in the thread pool |
|
|
| queues | Fixnum | 1 | number of concurrent queues |
|
|
| queue_size | Fixnum | 1000 | size of each queue |
|
|
| interval | Numeric | 0 | dispatcher interval for batch processing |
|
|
| batch | Boolean | false | enables batch processing mode |
|
|
| batch_size | Fixnum | nil | number of maximum items to be assigned at once |
|
|
| logger | Logger | nil | logger instance for debug logs |
|
|
|
|
| Option | Type | Default | Description |
|
|
| -- | -- | -- | -- |
|
|
| threads | Fixnum | 1 | number of threads in the thread pool |
|
|
| queues | Fixnum | 1 | number of concurrent queues |
|
|
| queue_size | Fixnum | 1000 | size of each queue |
|
|
| interval | Numeric | 0 | dispatcher interval for batch processing |
|
|
| batch | Boolean | false | enables batch processing mode |
|
|
| batch_size | Fixnum | nil | number of maximum items to be assigned at once |
|
|
| logger | Logger | nil | logger instance for debug logs |
|
|
|
|
| Option | Type | Default | Description |
|
|
| -- | -- | -- | -- |
|
|
| threads | Fixnum | 1 | number of threads in the thread pool |
|
|
| queues | Fixnum | 1 | number of concurrent queues |
|
|
| queue_size | Fixnum | 1000 | size of each queue |
|
|
| interval | Numeric | 0 | dispatcher interval for batch processing |
|
|
| batch | Boolean | false | enables batch processing mode |
|
|
| batch_size | Fixnum | nil | number of maximum items to be assigned at once |
|
|
| logger | Logger | nil | logger instance for debug logs |
|
|
|
|
|
|
|Option |Type |Default |Description |
|
|
|-- |-- |-- |-- |
|
|
|threads |Fixnum |1 |number of threads in the thread pool |
|
|
|queues |Fixnum |1 |number of concurrent queues |
|
|
|queue_size |Fixnum |1000 |size of each queue |
|
|
|interval |Numeric |0 |dispatcher interval for batch processing |
|
|
|batch |Boolean |false |enables batch processing mode |
|
|
|batch_size |Fixnum |nil |number of maximum items to be assigned at once |
|
|
|logger |Logger |nil |logger instance for debug logs |
|
|
|
|
| Option ~| Type ~| Default~| Description ~|
|
|
| -- ~| -- ~| -- ~| -- ~|
|
|
| threads ~| Fixnum ~| 1 ~| number of threads in the thread pool ~|
|
|
| queues ~| Fixnum ~| 1 ~| number of concurrent queues ~|
|
|
| queue_size~| Fixnum ~| 1000 ~| size of each queue ~|
|
|
| interval ~| Numeric~| 0 ~| dispatcher interval for batch processing ~|
|
|
| batch ~| Boolean~| false ~| enables batch processing mode ~|
|
|
| batch_size~| Fixnum ~| nil ~| number of maximum items to be assigned at once~|
|
|
| logger ~| Logger ~| nil ~| logger instance for debug logs ~|
|
|
|
|
```c
|
|
|
|
const char* str = "Hello";
|
|
int64_t count = 1 + 2;
|
|
static double pi = 3.14;
|
|
static std::map<std::string, float>* scores = pointer;
|
|
|
|
```
|
|
|
|
Paul@@@ McCartney{{{ 1942
|
|
George@@@ Harrison {{{ 1943
|
|
Ringo@@@ Starr {{{ 1940
|
|
Pete@@@ Best {{{ 1941
|
|
|
|
Paul McCartney 1942
|
|
George Harrison 1943
|
|
Ringo Starr 1940
|
|
Pete Best 1941
|
|
|
|
... - . -----
|
|
.. -- .. ----
|
|
. --- ... ---
|
|
---- .... --
|
|
. --- ..... -
|
|
.. -- ......
|
|
... - ..... -
|
|
|
|
... - . -----
|
|
.. -- .. ----
|
|
. --- ... ---
|
|
---- .... --
|
|
. --- ..... -
|
|
.. -- ......
|
|
... - ..... -
|
|
|
|
... - . -----
|
|
.. -- .. ----
|
|
. --- ... ---
|
|
---- .... --
|
|
. --- ..... -
|
|
.. -- ......
|
|
... - ..... -
|
|
|
|
... - . -----
|
|
.. -- .. ----
|
|
. --- ... ---
|
|
---- .... --
|
|
. --- ..... -
|
|
.. -- ......
|
|
... - ..... -
|
|
|
|
... - .-----
|
|
.. -- ..----
|
|
. --- ...---
|
|
---- ....--
|
|
. --- .....-
|
|
.. -- ......
|
|
... - .....-
|
|
|
|
... - . -----
|
|
.. -- .. ----
|
|
. --- ... ---
|
|
---- .... --
|
|
. --- ..... -
|
|
.. -- ......
|
|
... - ..... -
|
|
|
|
... - .-----
|
|
.. -- ..----
|
|
. --- ...---
|
|
---- ....--
|
|
. --- .....-
|
|
.. -- ......
|
|
... - .....-
|
|
|
|
... - .-----
|
|
.. -- ..----
|
|
. --- ...---
|
|
---- ....--
|
|
. --- .....-
|
|
.. -- ......
|
|
... - .....-
|
|
|
|
...-.-----
|
|
..--..----
|
|
.---...---
|
|
----....--
|
|
.---.....-
|
|
..--......
|
|
...-.....-
|
|
|
|
... - . -----
|
|
.. -- .. ----
|
|
. --- ... ---
|
|
---- .... --
|
|
. --- ..... -
|
|
.. -- ......
|
|
... - ..... -
|
|
|
|
... - .-----
|
|
.. -- ..----
|
|
. --- ...---
|
|
---- ....--
|
|
. --- .....-
|
|
.. -- ......
|
|
... - .....-
|
|
|
|
... - . -----
|
|
.. -- .. ----
|
|
. --- ... ---
|
|
---- .... --
|
|
. --- ..... -
|
|
.. -- ......
|
|
... - ..... -
|
|
|
|
... - . -----
|
|
.. -- .. ----
|
|
. --- ... ---
|
|
---- .... --
|
|
. --- ..... -
|
|
.. -- ......
|
|
... - ..... -
|
|
|
|
...-. -----
|
|
..--.. ----
|
|
.---... ---
|
|
----.... --
|
|
.---..... -
|
|
..--......
|
|
...-..... -
|
|
|
|
... - .-----
|
|
.. -- ..----
|
|
. --- ...---
|
|
---- ....--
|
|
. --- .....-
|
|
.. -- ......
|
|
... - .....-
|
|
|
|
apple = 1 = 2
|
|
banana = 2 = 2
|
|
cake = 3 = 2
|
|
daisy = 4 = 2
|
|
eggplant = 5 = 2
|
|
|
|
apple = 1 = 2
|
|
banana = 2 = 2
|
|
cake = 3 = 2
|
|
daisy = 4 = 2
|
|
eggplant = 5 = 2
|
|
|
|
apple = 1 = 2
|
|
banana = 2 = 2
|
|
cake = 3 = 2
|
|
daisy = 4 = 2
|
|
eggplant = 5 = 2
|
|
|
|
apple = 1 = 2
|
|
banana = 2 = 2
|
|
cake = 3 = 2
|
|
daisy = 4 = 2
|
|
eggplant = 5 = 2
|
|
|
|
apple = 1 = 2
|
|
banana = 2 = 2
|
|
cake = 3 = 2
|
|
daisy = 4 = 2
|
|
eggplant = 5 = 2
|
|
|
|
apple = 1 = 2
|
|
banana = 2 = 2
|
|
cake = 3 = 2
|
|
daisy = 4 = 2
|
|
eggplant = 5 = 2
|
|
|
|
1 apple = 1 = 2
|
|
1 banana = 2 = 2
|
|
1 cake = 3 = 2
|
|
1 daisy = 4 = 2
|
|
1 eggplant = 5 = 2
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
a pple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1 = 2
|
|
banana = 2 = 2
|
|
cake = 3 = 2
|
|
daisy = 4 = 2
|
|
eggplant = 5 = 2
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
apple = 1
|
|
banana = 2
|
|
cake = 3
|
|
daisy = 4
|
|
eggplant = 5
|
|
|
|
|
|
```c
|
|
|
|
int a = 1;
|
|
long b = 2;
|
|
float c = 3;
|
|
string d = 4;
|
|
// this line should not get aligned
|
|
long int e = 5;
|
|
std::map f;
|
|
std::map g; /* this? */
|
|
short h /* how about this? */ = 6;
|
|
string i = "asdf";
|
|
|
|
int a = 1;
|
|
long b = 2;
|
|
float c = 3;
|
|
string d = 4;
|
|
// this line should not get aligned
|
|
long int e = 5;
|
|
std::map f;
|
|
std::map g; /* this? */
|
|
short h /* how about this? */ = 6;
|
|
string i = "asdf";
|
|
|
|
```
|
|
|