1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-04 11:00:06 +08:00
SpaceVim/autoload/SpaceVim/layers/indentmove.vim
2017-02-17 00:56:55 -05:00

45 lines
1.7 KiB
VimL

""
" @section indentmove, layer-indentmove
" @parentsection layers
" Move cursor quickly according to indent.
"
" @subsection Mappings
" >
" Key mode function
" -----------------------------------------------------------------
" EH normal/visual move up to nearest line with smaller
" indent level
" EL normal/visual move down to nearest line with larger
" indent level
" EJ normal/visual move down to nearest line with smaller
" or same indent level
" EK normal/visual move down to nearest line with larger
" or same indent level
" EI normal/visual move down to nearest child indent
" <
"
"
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