Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added semicolon alignment support #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Demo

An *alignment rule* is a predefined set of options for common alignment tasks,
which is identified by a single character, such as `<Space>`, `=`, `:`, `.`,
`|`, `&`, `#`, and `,`.
`|`, `&`, `#`, `,`, and `;`.

#### `=`

Expand Down Expand Up @@ -151,7 +151,7 @@ xmap ga <Plug>(EasyAlign)
- `-` Around the last occurrences of delimiters (`-1`)
- `-2` Around the second to last occurrences of delimiters
- ...
1. Delimiter key (a single keystroke; `<Space>`, `=`, `:`, `.`, `|`, `&`, `#`, `,`) or an arbitrary regular expression followed by `<CTRL-X>`
1. Delimiter key (a single keystroke; `<Space>`, `=`, `:`, `.`, `|`, `&`, `#`, `,`, `;`) or an arbitrary regular expression followed by `<CTRL-X>`

#### 2. Using `:EasyAlign` command

Expand Down Expand Up @@ -180,6 +180,7 @@ alignment rules that you can trigger with a single keystroke.
| `&` | LaTeX tables (matches `&` and `\\`) |
| `#` | Ruby/Python comments |
| `"` | Vim comments |
| `;` | Assembly comments |
| `<Bar>` | Table markdown |

You can also define your own rules with `g:easy_align_delimiters` which will
Expand Down
1 change: 1 addition & 0 deletions autoload/easy_align.vim
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ let s:easy_align_delimiters_default = {
\ '.': { 'pattern': '\.', 'left_margin': 0, 'right_margin': 0, 'stick_to_left': 0 },
\ '#': { 'pattern': '#\+', 'delimiter_align': 'l', 'ignore_groups': ['!Comment'] },
\ '"': { 'pattern': '"\+', 'delimiter_align': 'l', 'ignore_groups': ['!Comment'] },
\ ';': { 'pattern': ';\+', 'delimiter_align': 'l', 'ignore_groups': ['!Comment'] },
\ '&': { 'pattern': '\\\@<!&\|\\\\',
\ 'left_margin': 1, 'right_margin': 1, 'stick_to_left': 0 },
\ '{': { 'pattern': '(\@<!{',
Expand Down