mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-14 21:03:48 -05:00
<Plug>(EasyAlign) / <Plug>(LiveEasyAlign) for vim-repeat integration
This commit is contained in:
@@ -15,11 +15,17 @@ Execute (Clean up test environment):
|
||||
|
||||
let g:easy_align_delimiters = {}
|
||||
let mapleader = ' '
|
||||
vnoremap <silent> <Enter> :EasyAlign<Enter>
|
||||
vnoremap <silent> r<Enter> :EasyAlign!<Enter>
|
||||
vnoremap <silent> <Leader><Enter> :LiveEasyAlign<Enter>
|
||||
vnoremap <silent> <Leader>r<Enter> :LiveEasyAlign!<Enter>
|
||||
nmap <leader>A <Plug>(EasyAlignOperator)
|
||||
|
||||
" " Legacy
|
||||
" vnoremap <silent> <Enter> :EasyAlign<Enter>
|
||||
" vnoremap <silent> <Leader><Enter> :LiveEasyAlign<Enter>
|
||||
" nmap <leader>A <Plug>(EasyAlignOperator)
|
||||
|
||||
vmap <Enter> <Plug>(EasyAlign)
|
||||
vmap <leader><Enter> <Plug>(LiveEasyAlign)
|
||||
nmap <leader>A <Plug>(EasyAlign)
|
||||
|
||||
###########################################################
|
||||
|
||||
@@ -1510,6 +1516,35 @@ Expect:
|
||||
'type': 'global',
|
||||
'url': 'http://localhost:8090/display/TEST'}
|
||||
|
||||
###########################################################
|
||||
|
||||
Given (Two paragraphs (requires vim-repeat)):
|
||||
a = 1
|
||||
bb = 2
|
||||
ccc = 3
|
||||
dddd = 4
|
||||
|
||||
d = 1
|
||||
cc = 2
|
||||
bbb = 3
|
||||
aaaa = 4
|
||||
|
||||
Do (Align and repeat):
|
||||
\<Space>Aip\<Enter>=
|
||||
6G
|
||||
.
|
||||
|
||||
Expect:
|
||||
a = 1
|
||||
bb = 2
|
||||
ccc = 3
|
||||
dddd = 4
|
||||
|
||||
d = 1
|
||||
cc = 2
|
||||
bbb = 3
|
||||
aaaa = 4
|
||||
|
||||
###########################################################
|
||||
Execute:
|
||||
Restore
|
||||
|
||||
Reference in New Issue
Block a user