Commit Graph

101 Commits

Author SHA1 Message Date
Junegunn Choi
12c319a8ac Implement special keys to switch option values in interactive mode
With this commit, we can now change option values in interactive mode with the
folowing special keys

- CTRL-L  left_margin
- CTRL-R  right_margin
- CTRL-D  delimiter_align
- CTRL-I  indentation
- CTRL-U  ignore_unmatched
- CTRL-G  ignore_groups

('ignores' option has been renamed to 'ignore_groups', but backward-compatible)
2013-08-20 01:38:20 +09:00
Junegunn Choi
5222db47cf Rename align_mode to mode_sequence 2013-08-19 02:37:46 +09:00
Junegunn Choi
74003c0297 Allow interactive mode with options 2013-08-19 02:25:38 +09:00
Junegunn Choi
999e1ff68e Implement center-align mode and align_modes option 2013-08-19 02:09:34 +09:00
Junegunn Choi
11a74c4176 Fix right-justification for lines with different indentation 2013-08-16 23:47:01 +09:00
Junegunn Choi
5c6558bd1b Improve right-justification mode
With this commit you can right-align the last token with * or ** field number.
For example, the following lines
    a = 1
    bb = 22
    ccc = 333
are aligned as follows on `:EasyAlign**=`
    a   =   1
    bb  =  22
    ccc = 333
And even if we don't have the second =, we can do `:EasyAlign!2=` to get
    a =     1
    bb =   22
    ccc = 333
2013-08-16 13:58:28 +09:00
Junegunn Choi
b6625f6d2b Fix: Unmatched token incorrectly ignored in right-justification mode 2013-08-16 09:37:04 +09:00
Junegunn Choi
1e2af43a64 Ignore unmatched line on right-justification mode
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)
2013-08-16 02:23:00 +09:00
Junegunn Choi
0fb997d5ab Add g:easy_align_indentation. Add n indentation option. 2013-08-16 01:38:50 +09:00
Junegunn Choi
90a5487974 Add indentation option 2013-08-16 00:15:57 +09:00
Junegunn Choi
aad5012615 Allow whitespaces between delimiter key and options 2013-08-13 20:38:23 +09:00
Junegunn Choi
0166077e16 Case-insensitive match of delimiter_align 2013-08-13 00:19:56 +09:00
Junegunn Choi
5e6e60d620 Add delimiter_align option 2013-08-12 20:33:04 +09:00
Junegunn Choi
712bab8c72 Allow zero-width matches 2013-08-12 11:58:52 +09:00
Junegunn Choi
7d031956ab Fix regression: lines with indentation 2013-08-12 01:47:05 +09:00
Junegunn Choi
c4dbfece32 Disallow recursive alignment in blockwise-visual mode 2013-08-12 01:34:14 +09:00
Junegunn Choi
a2811dc253 Add a proper support for \@= 2013-08-12 00:54:34 +09:00
Junegunn Choi
b3281fb19a Allow matching preceding atom with zero-width (\@=) 2013-08-11 02:33:22 +09:00
Junegunn Choi
1cf343a271 Workaround for E706
- Avoid E706 error
- Fix not to skip comment/string lines when ignore_unmatched is 0
2013-08-06 00:42:08 +09:00
Junegunn Choi
c66f35ad39 Disallow pattern option 2013-08-05 23:51:29 +09:00
Junegunn Choi
2486b9c6df Usability improvements
- Preserve indentation when a line starts with a delimiter
  - Useful for aligning multi-line method chains
- Renamed `margin_{left,right}` to `{left,right}_margin
  - Makes it easier to type in (`l`, `r`)
  - `margin_{left,right}` is still supported
- Margins can be specified as the number of spaces, or as an arbitrary string
2013-08-05 23:41:31 +09:00
Junegunn Choi
20124bc622 {\s\+} is a valid empty option 2013-08-05 02:15:02 +09:00
Junegunn Choi
bd8327499a Add support for arbitrary regular expressions 2013-08-04 11:22:40 +09:00
Junegunn Choi
057be51067 Left-align delimiters of different lengths when stick_to_left is set 2013-08-03 01:09:21 +09:00
Junegunn Choi
6d841110af Allow rule-wise configuration of ignores and ignore_unmatched 2013-08-02 12:21:55 +09:00
Junegunn Choi
9b20830c70 Fix: trailing delimiter not ignored (#4) 2013-08-01 23:28:05 +09:00
Junegunn Choi
5f59570c9f Ignore delimiters in certain syntax highlighting groups 2013-07-30 01:54:32 +09:00
Junegunn Choi
94524ec3d3 Left-right alternating alignment (**) 2013-07-15 20:53:30 +09:00
Junegunn Choi
3ee8cdfd9e Optimize recursive(*) alignment performance 2013-07-06 15:19:30 +09:00
Junegunn Choi
a6e707b1b3 Ignore comment lines 2013-06-19 14:20:37 +09:00
Junegunn Choi
8dd2daaa9e fix to preserve trailing whitespaces from prefix when delimiter sticks to left 2013-05-14 00:41:56 +09:00
Junegunn Choi
e3f7352ab8 remove unnecessary nr2char call 2013-05-13 15:02:44 +09:00
Junegunn Choi
0fe7d17908 add support for unicode characters 2013-05-13 12:44:42 +09:00
Junegunn Choi
27b95b4ce0 finish implementing negative field number 2013-05-13 12:38:58 +09:00
Junegunn Choi
5c870f60d9 fix non-interactive EasyAlign to take negative field # 2013-05-13 03:21:52 +09:00
Junegunn Choi
cb71847a11 support backspace in interactive mode 2013-05-13 03:10:33 +09:00
Junegunn Choi
1e627366e7 support negative modifier (backward scan) 2013-05-13 02:43:29 +09:00
Junegunn Choi
99bc81d492 add === to = group 2013-05-07 01:07:30 +09:00
Junegunn Choi
8591c888bf fix to process unmatched tokens in right-justficiation mode 2013-05-06 00:28:31 +09:00
Junegunn Choi
78d1a23dce removes center-justification mode 2013-05-05 01:01:42 +09:00
Junegunn Choi
0020db37ae adds support for right and center justification 2013-05-04 00:58:58 +09:00
Junegunn Choi
7dc67e5392 fixes a bug in partial alignment 2013-05-01 23:54:11 +09:00
Junegunn Choi
fdaf47b91e refactoring. better partial alignment. 2013-05-01 22:33:44 +09:00
Junegunn Choi
3f219f184a partial alignment in blockwise-visual mode 2013-05-01 15:15:39 +09:00
Junegunn Choi
503c8c860f vim-easy-align 2013-04-13 01:07:03 +09:00
Junegunn Choi
37734710c4 allows :LesserAlign command to take arguments 2013-04-11 20:54:05 +09:00
Junegunn Choi
39a520ed7b includes <<= and >>= 2013-04-08 22:11:14 +09:00
Junegunn Choi
0a9656675b allows custom alignment rules 2013-04-08 20:26:24 +09:00
Junegunn Choi
81f2565da3 handling lines w/o delimiters 2013-04-08 11:14:32 +09:00
Junegunn Choi
fb777534e0 fix: handling empty line 2013-04-08 10:46:18 +09:00