Add j/k motions

This commit is contained in:
Kim Silkebækken 2011-03-30 18:47:02 +02:00
parent fd5ed651a0
commit 92ef3190bd

View File

@ -61,6 +61,12 @@
nnoremap <silent> <Leader>ge :call EasyMotionE(0, 1)<CR> nnoremap <silent> <Leader>ge :call EasyMotionE(0, 1)<CR>
vnoremap <silent> <Leader>ge :<C-U>call EasyMotionE(1, 1)<CR> vnoremap <silent> <Leader>ge :<C-U>call EasyMotionE(1, 1)<CR>
nnoremap <silent> <Leader>j :call EasyMotionJK(0, 0)<CR>
vnoremap <silent> <Leader>j :<C-U>call EasyMotionJK(1, 0)<CR>
nnoremap <silent> <Leader>k :call EasyMotionJK(0, 1)<CR>
vnoremap <silent> <Leader>k :<C-U>call EasyMotionJK(1, 1)<CR>
endif endif
" }}} " }}}
" Initialize variables {{{ " Initialize variables {{{
@ -110,6 +116,9 @@
function! EasyMotionE(visualmode, direction) " {{{ function! EasyMotionE(visualmode, direction) " {{{
call s:EasyMotion('.\>', a:direction, a:visualmode ? visualmode() : '') call s:EasyMotion('.\>', a:direction, a:visualmode ? visualmode() : '')
endfunction " }}} endfunction " }}}
function! EasyMotionJK(visualmode, direction) " {{{
call s:EasyMotion('\%1v', a:direction, a:visualmode ? visualmode() : '')
endfunction " }}}
" }}} " }}}
" Helper functions {{{ " Helper functions {{{
function! s:Message(message) " {{{ function! s:Message(message) " {{{