diff --git a/README.md b/README.md index a8e2fc4..369eb3d 100644 --- a/README.md +++ b/README.md @@ -204,13 +204,14 @@ try these commands: - `:EasyAlign */[:;]\+/` - `:EasyAlign **/[:;]\+/` -Notice that you can't append `\zs` to your regular expression to put delimiters -on the left. It can be done by providing additional options in Vim dictionary -format. +You can also provide a number of alignment options, [which will be discussed in +detail later](https://github.com/junegunn/vim-easy-align#alignment-options), +to EasyAlign command in Vim dictionary format. - `:EasyAlign * /[:;]\+/ { 'stick_to_left': 1, 'left_margin': 0 }` -Then we get: +Which means that the matched delimiter should be positioned right next to the +preceding token, without margin on the left. So we get: apple;: banana:: cake data;; exchange:; format @@ -588,6 +589,9 @@ in interactive mode with the special key `CTRL-O`) Although the default rules should cover the most of the use cases, you can extend the rules by setting a dictionary named `g:easy_align_delimiters`. +You may refer to the definitions of the default alignment rules +[here](https://github.com/junegunn/vim-easy-align/blob/2.6.1/autoload/easy_align.vim#L29). + #### Example ```vim diff --git a/doc/easy_align.txt b/doc/easy_align.txt index a5b2ad0..c7fd451 100644 --- a/doc/easy_align.txt +++ b/doc/easy_align.txt @@ -153,13 +153,13 @@ try these commands: :EasyAlign */[:;]\+/ :EasyAlign **/[:;]\+/ -Notice that you can't append '\zs' to your regular expression to put delimiters -on the left. It can be done by providing additional options in Vim dictionary -format. +You can also provide a number of alignment options, which will be discussed in +detail later, to EasyAlign command in Vim dictionary format. :EasyAlign * /[:;]\+/ { 'stick_to_left': 1, 'left_margin': 0 } -Then we get: +Which means that the matched delimiter should be positioned right next to the +preceding token, without margin on the left. So we get: apple;: banana:: cake data;; exchange:; format