1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-04 14:00:05 +08:00
SpaceVim/autoload/SpaceVim/layers/indentmove.vim

45 lines
1.7 KiB
VimL
Raw Normal View History

2017-02-10 23:57:35 +08:00
""
2017-02-12 09:52:43 +08:00
" @section indentmove, layer-indentmove
2017-02-10 23:57:35 +08:00
" @parentsection layers
" Move cursor quickly according to indent.
2017-02-10 23:57:35 +08:00
"
" @subsection Mappings
2017-02-10 23:57:35 +08:00
" >
" Key mode function
" -----------------------------------------------------------------
" EH normal/visual move up to nearest line with smaller
2017-02-10 23:57:35 +08:00
" indent level
" EL normal/visual move down to nearest line with larger
2017-02-10 23:57:35 +08:00
" indent level
" EJ normal/visual move down to nearest line with smaller
2017-02-10 23:57:35 +08:00
" or same indent level
" EK normal/visual move down to nearest line with larger
2017-02-10 23:57:35 +08:00
" or same indent level
" EI normal/visual move down to nearest child indent
2017-02-10 23:57:35 +08:00
" <
"
"
function! SpaceVim#layers#indentmove#plugins() abort
return [
\ ['ZSaberLv0/ZFVimIndentMove', { 'merged' : 0}],
\ ]
endfunction
function! SpaceVim#layers#indentmove#config() abort
nnoremap <silent> E <nop>
nnoremap <silent> EE ``
nnoremap <silent> EH :call ZF_IndentMoveParent('n')<cr>
xnoremap <silent> EH :<c-u>call ZF_IndentMoveParent('v')<cr>
nnoremap <silent> EL :call ZF_IndentMoveParentEnd('n')<cr>
xnoremap <silent> EL :<c-u>call ZF_IndentMoveParentEnd('v')<cr>
nnoremap <silent> EK :call ZF_IndentMovePrev('n')<cr>
xnoremap <silent> EK :<c-u>call ZF_IndentMovePrev('v')<cr>
nnoremap <silent> EJ :call ZF_IndentMoveNext('n')<cr>
xnoremap <silent> EJ :<c-u>call ZF_IndentMoveNext('v')<cr>
nnoremap <silent> EI :call ZF_IndentMoveChild('n')<cr>
xnoremap <silent> EI :<c-u>call ZF_IndentMoveChild('v')<cr>
endfunction