From 4c2808d13cdac99e1b83d933d366f1e4dc722a0d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Thu, 10 Oct 2013 16:04:48 +0900 Subject: [PATCH] Relocate operator section --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 37023a7..b4a8a20 100644 --- a/README.md +++ b/README.md @@ -278,6 +278,26 @@ my_hash = { :a => 1, However, in this case, we don't really need blockwise visual mode since the same can be easily done using the negative N-th parameter: `-=` +### EasyAlign as Vim operator + +You can define an operator function which executes EasyAlign command, so that it +can be used with a Vim movement. + +```vim +function! s:easy_align_1st_eq(type, ...) + '[,']EasyAlign= +endfunction +nnoremap = :set opfunc=easy_align_1st_eqg@ + +function! s:easy_align_1st_colon(type, ...) + '[,']EasyAlign: +endfunction +nnoremap : :set opfunc=easy_align_1st_colong@ +``` + +Now without going into visual mode, you can align the lines in the paragraph +by `=ip` or `:ip`. + Alignment options ----------------- @@ -619,26 +639,6 @@ let g:easy_align_delimiters = { \ } ``` -### EasyAlign as Vim operator - -You can define an operator function which calls EasyAlign command, so that it -can be used with a Vim movement. - -```vim -function! s:easy_align_1st_eq(type, ...) - '[,']EasyAlign= -endfunction -nnoremap = :set opfunc=easy_align_1st_eqg@ - -function! s:easy_align_1st_colon(type, ...) - '[,']EasyAlign: -endfunction -nnoremap : :set opfunc=easy_align_1st_colong@ -``` - -Now without going into visual mode, you can align the lines in the paragraph -by `=ip` or `:ip`. - Advanced examples and use cases -------------------------------