From 96dfabb03bf9f5529f0e6d8d8e5fdfdd605d8641 Mon Sep 17 00:00:00 2001 From: EinfachToll Date: Mon, 6 Jan 2014 13:37:33 +0100 Subject: [PATCH] When pressing S-Tab, always jump to prev link not to the start of the link the cursor is on --- autoload/vimwiki/base.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/vimwiki/base.vim b/autoload/vimwiki/base.vim index c72d7f2..2435368 100644 --- a/autoload/vimwiki/base.vim +++ b/autoload/vimwiki/base.vim @@ -290,7 +290,7 @@ endfunction "}}} " vimwiki#base#subdir "FIXME TODO slow and faulty -function! vimwiki#base#subdir(path, filename)"{{{ +function! vimwiki#base#subdir(path, filename) "{{{ let g:VimwikiLog.subdir += 1 "XXX let path = a:path " ensure that we are not fooled by a symbolic link @@ -904,6 +904,11 @@ endfunction " }}} " vimwiki#base#find_prev_link function! vimwiki#base#find_prev_link() "{{{ + "Jump 2 times if the cursor is in the middle of a link + if synIDattr(synID(line('.'), col('.'), 0), "name") =~ "VimwikiLink.*" && + \ synIDattr(synID(line('.'), col('.')-1, 0), "name") =~ "VimwikiLink.*" + call vimwiki#base#search_word(g:vimwiki_rxAnyLink, 'b') + endif call vimwiki#base#search_word(g:vimwiki_rxAnyLink, 'b') endfunction " }}}