diff --git a/test/basic.expected b/test/basic.expected deleted file mode 100644 index 232486e..0000000 --- a/test/basic.expected +++ /dev/null @@ -1,1075 +0,0 @@ -" :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 = # - 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 - -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 - - 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 - -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 - -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 - -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 - -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* 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"; - -``` - -```ruby - -a = -a = 1 -bbbb .= 2 -ccccccc = 3 - ccccccccccccccc -# eeeeeeeeeeeeeeee -e # asdf -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 - -a = -a = 1 -bbbb .= 2 -ccccccc = 3 -ccccccccccccccc -# eeeeeeeeeeeeeeee -e # asdf -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 - - a = - a = 1 - bbbb .= 2 - ccccccc = 3 -ccccccccccccccc -# eeeeeeeeeeeeeeee -e # asdf - 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 - -a = -a = 1 -bbbb .= 2 -ccccccc = 3 -ccccccccccccccc -# eeeeeeeeeeeeeeee -e # asdf -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 - - a = - a = 1 - bbbb .= 2 - ccccccc = 3 -ccccccccccccccc -# eeeeeeeeeeeeeeee -e # asdf - 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 - - a = - a = 1 - bbbb .= 2 - ccccccc = 3 -ccccccccccccccc -# eeeeeeeeeeeeeeee -e # asdf - 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 - -a = 1 -bb = 22 -ccc = 333 -dddd = "asdf" - -a = 1 -bb = 22 -ccc = 333 -dddd = "asdf" - - a = 1 - bb = 22 - ccc = 333 -dddd = "asdf" - -a = 1 -bb = 22 -ccc = 333 -dddd = "asdf" - - a = 1 - bb = 22 - ccc = 333 -dddd = "asdf" - -a = 1 -bb = 22 -ccc = 333 -dddd = "asdf" - - a = 1 - bb = 22 - ccc = 333 -dddd = "asdf" - -``` - - a a a a a - bbb bbb bbb bbb bbb -ccccc ccccc ccccc ccccc ccccc - d ddd dddd ddd d - -aaaaa = 123456778901234567890 = -bbbbbbbbbb = 12345 = - -aaaaa = 123456778901234567890 = -cccccccccccccccccc = 123 = - -aaaaa = 123456778901234567890 = -cccccccccccccccccc = 12345678 = - -aaaaa = 12345 = -bbbbbbbbbb = 123456778901234567890 = - - aaaaa = 12345 -bbbbbbbbbb = 123456778901234567890 - -123456 789 -1234567890 1 - -1234 56 -123456 7890 - - aaaaa = 123456778901234567890 = - cccccccccccccccccc = 12345678 = - -| 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 | - -``` - aaaaa = 123456778901234567890 = -cccccccccccccccccc =12345678 = - - aaaa = 123456778901234567890 = - cccccccccccccccccc = 12345678 = - - aaaa = 123456778901234567890 = -cccccccccccccccccc = 12345678 = - - aaaa = 123456778901234567890 = - cccccccccccccccccc = 12345678 = - - aaaa = 123456778901234567890 = - cccccccccccccccccc = 12345678 = - - aaaa = 123456778901234567890 = - cccccccccccccccccc = 12345678 = - - aaaaaaaaaaaaa = 123456778901234567890 = - cc = 12345678 = - - aaaaaaaaaaa = 123 - a = 123 - - aaaaaaaaaaaa = 123 - a = 123 - -aaaaaaaaaaaa = 123 -aaaaaaaaaaa = 123 - aaaaaaaaaa = 123 - aaa = 123 - aa = 123 - a = 123 - - aaaaaaaaaaaa = 123 - aaaaaaaaaaa = 123 - aaaaaaaaaa = 123 - aaa = 123 - aa = 123 - a = 123 - - aaaaaaaaaaaa = 123 - aaaaaaaaaaa = 123 - aaaaaaaaaa = 123 - aaa = 123 - aa = 123 - a = 123 - - aaaa = 123456778901234567890 = - cccccccccccccc = 12345678 = - - aaaa = 123456778901234567890 = - bbbbbb = 4 - cccccccccccccccccc = 12345678 = - - aaaa = 123456778901234567890 = - cccccccccccccccccc = 12345678 = - - aaaaa = 123456778901234567890 = - cc = 12345678 = - -= aaaaa = 123456778901234567890 = -= cccccccccccccccccc = 12345678 = - -=aaaaa = 123456778901234567890 = -= cccccccccccccccccc = 12345678 = - -``` - - a, , bbb - aa, , bb -aaa, , b -aaaa, , -aaa, b, - aa, bb, - a, bbb, - -1 22222 33 444 555 6666 7 888 -11 222 3333 4 55 6666 77 888 -111 22 333 444 55555 6666 7 88888 -1111 2 33 444 555 66 777 8 - -1 22222 33 444 555 6666 7 888 -11 222 3333 4 55 6666 77 888 -111 22 333 444 55555 6666 7 88888 -1111 2 33 444 555 66 777 8 - -1 22222 33 444 555 6666 7 888 -11 222 3333 4 55 6666 77 888 -111 22 333 444 55555 6666 7 88888 -1111 2 33 444 555 66 777 8 - - a = 1 - bb = 2 -ccccc -ddd = 3 - - a = 1 - bb = 2 -ccccc - ddd = 3 diff --git a/test/basic.md b/test/basic.md deleted file mode 100644 index d482ff3..0000000 --- a/test/basic.md +++ /dev/null @@ -1,273 +0,0 @@ -" :source run.vim -" @a - -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 | - -aaa, bb,c -d,eeeeeee -fffff, gggggggggg, -h, , ii -j,,k - -```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 - -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 - -``` - -```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 - -``` -```c - -/* 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 - - | 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* scores = pointer; - -``` - -Paul McCartney 1942 -George Harrison 1943 -Ringo Starr 1940 -Pete Best 1941 - -...-.----- -..--..---- -.---...--- -----....-- -.---.....- -..--...... -...-.....- - - 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"; - -``` - -```ruby - -a = -a = 1 -bbbb .= 2 -ccccccc = 3 -ccccccccccccccc -# eeeeeeeeeeeeeeee -e # asdf -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 - -a = 1 -bb = 22 -ccc = 333 -dddd = "asdf" - -``` - -a a a a a -bbb bbb bbb bbb bbb -ccccc ccccc ccccc ccccc ccccc - d ddd dddd ddd d - -aaaaa = 123456778901234567890 = -bbbbbbbbbb = 12345 = - -aaaaa = 123456778901234567890 = -cccccccccccccccccc = 123 = - -aaaaa = 123456778901234567890 = -cccccccccccccccccc = 12345678 = - -aaaaa = 12345 = -bbbbbbbbbb = 123456778901234567890 = - -aaaaa = 12345 -bbbbbbbbbb = 123456778901234567890 - -123456 789 -1234567890 1 - -1234 56 -123456 7890 - - aaaaa = 123456778901234567890 = - cccccccccccccccccc = 12345678 = - -``` - aaaaa = 123456778901234567890 = -cccccccccccccccccc =12345678 = - - aaaa = 123456778901234567890 = - cccccccccccccccccc = 12345678 = - - aaaaaaaaaaaaa = 123456778901234567890 = -cc = 12345678 = - - aaaaaaaaaaa= 123 - a = 123 - - aaaaaaaaaaaa= 123 - a = 123 - - aaaaaaaaaaaa = 123 - aaaaaaaaaaa = 123 - aaaaaaaaaa = 123 - aaa = 123 - aa = 123 - a = 123 - - aaaa = 123456778901234567890 = -cccccccccccccc = 12345678 = - - aaaa = 123456778901234567890 = - bbbbbb = 4 -cccccccccccccccccc = 12345678 = - - aaaa = 123456778901234567890 = - cccccccccccccccccc = 12345678 = - - aaaaa = 123456778901234567890 = - cc = 12345678 = - -=aaaaa = 123456778901234567890 = -= cccccccccccccccccc = 12345678 = - -``` - -a,,bbb -aa,,bb -aaa,,b -aaaa,, -aaa,b, -aa,bb, -a,bbb, - -1 22222 33 444 555 6666 7 888 -11 222 3333 4 55 6666 77 888 -111 22 333 444 55555 6666 7 88888 -1111 2 33 444 555 66 777 8 - diff --git a/test/basic.script b/test/basic.script deleted file mode 100644 index 26a329d..0000000 --- a/test/basic.script +++ /dev/null @@ -1 +0,0 @@ -4Gvipjyvip Pvip 2 Pvip * Pvip Pvip 2 Pvip * Pvip ** Pvip - Pvip -2 Pvip -1 Pvip ** 60zzvipjyvip *|Pvip *|Pvip **|80zzvip **|gv 3|vip *|90zzvip *,100zzvipjyvip =Pvip *=Pvip **=Pvip =vip 2=198Gvipjyvip =Pvip -=Pf:jj3E =209Gvip - 214zzvipjyvip #P:let g:easy_align_delimiters = { '#': {'pattern': '#\+', 'ignore_groups': ['String'] } } vip #227zzvip :239zzvip *=vipjyP:let g:easy_align_ignore_groups = [] vip *=:unlet g:easy_align_delimiters :unlet g:easy_align_ignore_groups 4Gvipy4GP7Gojkkvip:EasyAlign /1/{'ml':'{{', 'mr-r':'}}'} vipjyPvip:EasyAlign */../ 263zzvipjygv .Pvip *.Pvip * .Pvip .vip 2.Pvip **.Pvip **.Pvip -.G303zzvip .310zzvipjygv *|Pvip *|Pvip |gv -|gv **|gv *|gv **|jji jjjhi vip ** |339Gpvip:EasyAlign*|{'ml': 5, 'mrr': 0 } 349Gpvip:EasyAlign*/|/{'ml':'~', 'mrr': 4} 362G:let g:easy_align_delimiters = { 'd': { 'pattern': '\s\+\(\S\+\s*[;=]\)\@=', 'left_margin': 0, 'right_margin': 0 } } vip dgv =236GvipjyPvip :377Gvip gv 2 382Gvipjyvip:EasyAlign/-\+/ Pvip:EasyAlign2/-\+/ Pvip:EasyAlign*/-\+/ Pvip:EasyAlign*/-\+/{'da': L} Pvip:EasyAlign/-\+/{'da': c} Pvip:EasyAlign*/-\+/{'delimiter_align':'C'} Pvip:EasyAlign*/-\+/{'da': 'x'} 381Gpvip:EasyAlign/-\+/{'da':r} :let g:easy_align_delimiter_align = 'l' Pvip:EasyAlign/-\+/ Pvip:EasyAlign*/-\+/ :unlet g:easy_align_delimiter_align :let g:easy_align_delimiters['\'] = { 'pattern': '-\+', 'delimiter_align': 'c' } Pvip \Pvip *-\Pvip:EasyAlign *\\ {'da':l} Pvip:EasyAlign*\\ Pvip:EasyAlign*\\{'da': 'R'} 377GvipjyPvip:EasyAlign\ {'l': '@@@'} gv:EasyAlign 2 \ {'l': '{{{'} 507Gvipjygv:EasyAlign= Pvip:EasyAlign = {'idt': s} Pvip:EasyAlign= {'idt': d} Pvip:EasyAlign**={'indentation': 'd'} Pvip:EasyAlign!= Pvip:EasyAlign! **= {'indent': s} Pvip:EasyAlign!* = {'idt': D} Pvip:EasyAlign! ={'idt':'S'} 507GPvip:EasyAlign-={'idt':d} PA = 2j.j.j.j.vip:EasyAlign2={'idt': s} 507GPljjjj$:EasyAlign = {'idt': s} Pljjjj$:EasyAlign={'indent':d} Phhxxvip:EasyAlign={'idt':'s'} 525Gvipjy507GPPvip:EasyAlign*={'idt':s} Pvip:EasyAlign!**={'idt':s} Pvip:EasyAlign = {'idt': D} 525G^hhr1jr1jr1jr1jr1llkkkk$:EasyAlign = { 'idt': s } 513GvipjyPvip:EasyAlign*={'idt':n} Pvip:EasyAlign = { 'idt': N } Pvip:EasyAlign!*= {'idt': 'n'} 630Gvipjygv =Pvip =656Gvipjygv =Pvip *=Pvip **=Pvip **=Pvip:EasyAlign**= {'iu':0} Pvip =vip 2=vip -0 =818Gvipjygv =Pvip 2=Pvip *=Pvip **=Pvip **=Pvip -0=Pvip -0=855Gvip ** 860Gvip 2=}863Gvip 2=866Gvip 2=869Gvip 2=872Gvip *=875Gvip 2 878Gvip 2 881Gvip:EasyAlign**={'m': 'c','idt':s} ggjjj70Gvipjy883Gpvip *|vipjy893Gpvip:EasyAlign*|{'m': 'lcr'} 903Gpvip:EasyAlign**|{'m':'llc'} 913Gpvip:s/^|// vip:EasyAlign*|{'idt':n} vip:EasyAlign**|{'m':'cl'} 107GvipjyPvip  *=Pvip  *=975GVj 2=978Gvipjygv =Pvip =Pvip =Pvip =Pvip 2=993Gvip =996Gvip =999Gvip =1002Gvip =vipjyPvip =Pvip =1023Gvip =1026Gvip =1030Gvip =1033Gvip =1036Gvip 3=vipjyPvip 2=1044Gvip *,1052Gvipjygv:EasyAlign{'m':'lrc*'} 3 Pvip:EasyAlign{'mode_seq':'lrc**'} 2 Pvip:EasyAlign{'ms':'lccr**'} 1066Goa = 1 bb = 2 ccccc ddd = 3vipyvip =OPvip  = diff --git a/test/commandline.vader b/test/commandline.vader new file mode 100644 index 0000000..ac1db2f --- /dev/null +++ b/test/commandline.vader @@ -0,0 +1,157 @@ +Execute (Clean up test environment): + let g:easy_align_delimiters = {} + silent! unlet g:easy_align_ignore_groups + silent! unlet g:easy_align_ignore_unmatched + silent! unlet g:easy_align_indentation + silent! unlet g:easy_align_delimiter_align + +Given (fruits): + apple;:;;banana::cake + data;;exchange:;::format + +Execute (regular expression): + %EasyAlign/[:;]\+/ + +Expect: + apple ;:;; banana::cake + data ;; exchange:;::format + +Execute (options dictionary): + %EasyAlign/[:;]\+/{ 'left_margin': '<', 'right_margin': 3 } + +Expect: + apple<;:;; banana::cake + data < ;; exchange:;::format + +Execute (fuzzy matching): + %EasyAlign/[:;]\+/{ 'l':'<', 'r': '>'} + +Expect: + apple<;:;;>banana::cake + data < ;;>exchange:;::format + +Execute (shorthand notation of margin): + %EasyAlign/[:;]\+/l0r0 + +Expect: + apple;:;;banana::cake + data ;;exchange:;::format + +Execute (delimiter align): + %EasyAlign*/[:;]\+/l0r0dc + +Expect: + apple;:;;banana :: cake + data ;; exchange:;::format + +Execute (shorthand notation of mode_sequence and margin): + %EasyAlign/[:;]\+/mrc*l2r2 + +Expect: + apple ;:;; banana :: cake + data ;; exchange :;:: format + +Execute (deep indentation): + %EasyAlign/[:;]\+/mrc*l2r2 + %EasyAlign*/[:;]\+/idmrl* + +Expect: + apple ;:;; banana :: cake + data ;; exchange :;:: format + +Execute (stick_to_left): + %EasyAlign*/[:;]\+/stl1l0dlrm3 + +Expect: + apple;:;; banana:: cake + data;; exchange:;:: format + +Execute (different regular expression): + %EasyAlign*/../{'lm':'<','rm':'>'} + +Expect: + ap><:;><;b><:c>e + da><;;><:;><::>' } + +Expect: + ap><:;><;b><:c>e< + da><;;><:;><::> :EasyAlign + vnoremap :EasyAlign! ########################################################### @@ -330,16 +332,27 @@ Expect javascript: "user: pass": "r00t: pa55" }; +Execute (set g:easy_align_ignore_groups and g:easy_align_ignore_unmatched): + let g:easy_align_ignore_unmatched = 0 + let g:easy_align_ignore_groups = [] + +Do (do not ignore comments and strings, do not ignore unmatched using global vars): + vip\*: + Expect javascript: var jdbc = { // 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" + 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" }; +Execute (unset g:easy_align_ignore_groups and g:easy_align_ignore_unmatched): + unlet g:easy_align_ignore_unmatched + unlet g:easy_align_ignore_groups + ########################################################### Given (table): @@ -884,6 +897,22 @@ Expect: .third .call .method_4 .execute +Execute (set g:easy_align_indentation): + let g:easy_align_indentation = 'd' + +Do (around all . with deep indentation): + vip\*. + +Expect: + my_object + .method1 .chain + .second_method.call + .third .call + .method_4 .execute + +Execute (unset g:easy_align_indentation): + unlet g:easy_align_indentation + Do (right-align around all .): vip\\*. @@ -1086,3 +1115,123 @@ Expect: aaaaa = 12345 bbbbbbbbbb = 123456778901234567890 +########################################################### + +Given (long delimiter): + ...-.----- + ..--..---- + .---...--- + ----....-- + .---.....- + ..--...... + ...-.....- + +Do: + vip\*\-\+\ + +Expect: + ... - . ----- + .. -- .. ---- + . --- ... --- + ---- .... -- + . --- ..... - + .. -- ...... + ... - ..... - + +Do: + vip\*\\-\+\ + +Expect: + ... - . ----- + .. -- .. ---- + . --- ... --- + ---- .... -- + . --- ..... - + .. -- ...... + ... - ..... - + +Do: + vip\*\\\-\+\ + +Expect: + ... - . ----- + .. -- .. ---- + . --- ... --- + ---- .... -- + . --- ..... - + .. -- ...... + ... - ..... - + +Execute (set g:easy_align_delimiter_align): + let g:easy_align_delimiter_align = 'c' + +Do: + vip\*\-\+\ + +Expect: + ... - . ----- + .. -- .. ---- + . --- ... --- + ---- .... -- + . --- ..... - + .. -- ...... + ... - ..... - + +Execute (unset g:easy_align_delimiter_align): + unlet g:easy_align_delimiter_align + +########################################################### + +Execute (set g:easy_align_interactive_modes): + let g:easy_align_interactive_modes = ['r', 'c'] + let g:easy_align_bang_interactive_modes = ['c', 'l'] + +Given (Test g:easy_align_interactive_modes): + a = 1 + bb = 2 + ccc = 3 + +Do: + vip\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Do: + vip\\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Do: + vip\\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Do: + vip\\\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Do: + vip\\\\= + +Expect: + a = 1 + bb = 2 + ccc = 3 + +Execute (unset g:easy_align_interactive_modes): + unlet g:easy_align_interactive_modes + unlet g:easy_align_bang_interactive_modes + diff --git a/test/regexp.expected b/test/regexp.expected deleted file mode 100644 index 0ceea49..0000000 --- a/test/regexp.expected +++ /dev/null @@ -1,128 +0,0 @@ -" :source run.vim -" @a - -apple;:banana :: cake -data;;exchange :; format - -apple ;: banana :: cake - data ;; exchange :; format - -apple ;: banana :: cake -data ;; exchange :; format - -apple ;:____banana::cake -data ;;____exchange:;format - -apple ; : banana : : cake -data ; ; exchange : ; format - -ap pl e; :b an an a: :c ak e -da ta ;; ex ch an ge :; fo rm at - -ap ple;:banana::cake -da ta;;exchange:;format - -apple???;:~~~banana???::~~~ cake -data???;;~~~ exchange???:;~~~format - -apple;: banana::cake -data;; exchange:;format - -apple<<<;:>>>banana::cake -data <<<;;>>>exchange:;format - -apple ;: banana::cake -data ;; exchange:;format - -apple;:banana :: cake -data;;exchange :; format - -apple ;: banana :: cake -data ;; exchange :; format - -apple ;: banana :: cake -data ;; exchange :; format - -apple ;: banana :: cake -data ;; exchange :; format - -apple ;: banana :: cake -data ;; exchange :; format - -apple ;: banana::cake -data ;; exchange:;format - -apple ; :banana::cake -data ; ; exchange: ; format - -apple ; :banana::cake -data ; ;exchange:;format - -apple ; :banana::cake -data ; ;exchange:;format - -apple;:banana::cake -data;;exchange:;format - -apple;: banana: : cake -data;;exchange: ;format - -apple;:banana: :cake -data;;exchange:;format - -apple;:banana: :cake -data;;exchange:;format - -apple;: banana: : cake -data;;exchange: ;format - -apple;:banana:: cake -data;;exchange: ;format - -apple;: banana: : cake -data;;exchange: ;format - -apple;: banana::cake -data;;exchange: ;format - -```ruby -apple = 1 # comment not aligned -apricot = 'DAD' + 'F#AD' -banana = 'Gros Michel' # comment 2 -``` - -a()p()p()l()e();():()b()a()n()a()n()a():():()c()a()k()e( -d()a()t()a();();()e()x()c()h()a()n()g()e():();()f()o()r()m()a()t( - -apple ;: banana :: cake - data ;;exchange :;format - -apple ;: banana :: cake - data ;; exchange :; format - -apple;:banana ::cake -data ;;exchange:;format - -apple ;: banana :: cake -data ;; exchange :; format - -a+= 1 -bb==# 2 -ccc= 3 -dddd=> 4 - -apple;: banana:: cake - data;; exchange:; format - -```ruby -apple = 1 # comment not aligned -apricot = 'DAD' + 'F#AD' -banana = 'Gros Michel' # comment 2 -``` - -```ruby -apple = 1 # comment not aligned -apricot = 'DAD' + 'F#AD' -banana = 'Gros Michel' # comment 2 -``` - diff --git a/test/regexp.md b/test/regexp.md deleted file mode 100644 index 3a31b5a..0000000 --- a/test/regexp.md +++ /dev/null @@ -1,12 +0,0 @@ -" :source run.vim -" @a - -apple;:banana::cake -data;;exchange:;format - -```ruby -apple = 1 # comment not aligned -apricot = 'DAD' + 'F#AD' -banana = 'Gros Michel' # comment 2 -``` - diff --git a/test/regexp.script b/test/regexp.script deleted file mode 100644 index 159c0bd..0000000 --- a/test/regexp.script +++ /dev/null @@ -1 +0,0 @@ -4Gvipjyvip:EasyAlign: Pvip:EasyAlign*: Pvip:EasyAlign-: Pvip:EasyAlign * : Pvip:EasyAlign -2 : Pvip:EasyAlign -2: Pvip:EasyAlign *: Pvip:EasyAlign; Pvip:EasyAlign /;/ Pvip:EasyAlign/;/ Pvip:EasyAlign*/;/ Pvip:EasyAlign/[:;]\+/ Pvip:EasyAlign*/[:;]\+/ Pvip:EasyAlign* /[:;]\+/ Pvip:EasyAlign */[:;]\+/ Pvip:EasyAlign * /[:;]\+/ Pvip:EasyAlign-/[:;]\+/ Pvip:EasyAlign-2/[:;]\+/ Pvip:EasyAlign/[:;]\+/{ 'l': '<<<', 'r': '>>>'} Pvip:EasyAlign/[:;]\+/{'l':'', 's': 1} Pvip:EasyAlign * /[:;]\+/ {'stick_to': 1, 'le': '???', 'marr': '~~~'} Pvip:EasyAlign /../ Pvip:EasyAlign*/../ Pvip:EasyAlign **/[:;\+]/ Pvip:EasyAlign/[:;]\+/{'rm':'____'} Pvip:EasyAlign**/[:;]\+/ Pvip:EasyAlign!**/[:;]\+/ Pfbjfm:EasyAlign/[:;]\+/ 90Gvip:EasyAlign/#/{'is':['String'],'iu':0} 93Gpvip:EasyAlign*/\s*/{'l':'(', 'r': ')'} 96Gpvip:EasyAlign*/[:;]\+/r3l3s1 Pvip:EasyAlign*/[:;]\+/r0l0s0 Pvip:EasyAlign*/[:;]\+/mrcr Pvip:EasyAlign*/[:;]\+/mrcrr0l2 108Goa+=1 bb==#2 ccc=3 dddd=>4vip:EasyAlign=dll0s1r5id 112Gopvip:EasyAlign/[:;]\+/msrrc**lm0rm3stl1dacidtd 88Gvipjy116Gpvip:EasyAlign3\ ig['String'] Pvip:EasyAlign3\ ig['string'] diff --git a/test/run.vim b/test/run.vim deleted file mode 100644 index 4222159..0000000 --- a/test/run.vim +++ /dev/null @@ -1,51 +0,0 @@ -e! - -function! GFM() - let syntaxes = { - \ 'ruby': 'syntax/ruby.vim', - \ 'yaml': 'syntax/yaml.vim', - \ 'vim': 'syntax/vim.vim', - \ 'sh': 'syntax/sh.vim', - \ 'python': 'syntax/python.vim', - \ 'java': 'syntax/java.vim', - \ 'c': 'syntax/c.vim' - \ } - - for [lang, syn] in items(syntaxes) - unlet b:current_syntax - silent! exec printf("syntax include @%s %s", lang, syn) - exec printf("syntax region %sSnip matchgroup=Snip start='```%s' end='```' contains=@%s", - \ lang, lang, lang) - endfor - let b:current_syntax='mkd' - - syntax sync fromstart -endfunction - -silent! unlet g:easy_align_delimiters -silent! unlet g:easy_align_ignore_unmatched -silent! unlet g:easy_align_ignores - -vnoremap :EasyAlign - -noremap -noremap -noremap -noremap -vnoremap -vnoremap -vnoremap -vnoremap - -set nolazyredraw -set buftype=nofile -set colorcolumn= - -silent! ScrollPositionHide - -call GFM() - -normal gg -let @b=system('cat '. expand('%:p:r') . '.script') -let @a='@b:vert diffsplit ' . expand('%:p:r') . '.expected ' -" Syntax highlighting doesn't work if we do @a here