Commit Graph

16 Commits

Author SHA1 Message Date
Junegunn Choi
01337b9c4e Include .= operator in = rule 2013-08-23 17:40:13 +09:00
Junegunn Choi
4c5d6d9e82 Improve center-alignment: ignore leading whitespaces 2013-08-22 23:41:21 +09:00
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
6fb4f57b5a Add test cases for center-alignment 2013-08-19 04:14:56 +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
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
5e6e60d620 Add delimiter_align option 2013-08-12 20:33:04 +09:00
Junegunn Choi
7d031956ab Fix regression: lines with indentation 2013-08-12 01:47:05 +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
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
bd8327499a Add support for arbitrary regular expressions 2013-08-04 11:22:40 +09:00