1

I have been trying to make UltiSnips work with VimWiki to no avail, as they share mappings for expand snippet/next link (on <tab>).

I tried setting VimWiki's bindings to something else by using the following, which sadly didn't work, as the snippets didn't expand:

" vimwiki plugin settings
filetype plugin on
let g:vimwiki_list = [{'path': '~/Wiki/', 'syntax': 'markdown', 'ext': '.md'}]
nmap <C-j> <Plug>VimwikiNextLink
nmap <C-k> <Plug>VimwikiPrevLink

" ultisnips plugin settings
let g:UltiSnipsSnippetsDir=$HOME.'/.vim/UltiSnips/'
let g:UltiSnipsSnippetDirectories=["UltiSnips"]

let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"

The link to my entire vimrc can be found here.

If I set UltiSnips' expand trigger to anything else (like <c-j>), it works without a problem, but I am quite used to expanding on <tab> from other apps that I use.

Is there anything I can do to fix this problem?

Thanks in advance!

0

The solution to this issue can be found in this thread.

The only thing one has to do is to add this line to ~/.vimrc, which allows to both use Tab in normal mode to cycle through links, and to expand links in Insert mode:

let g:vimwiki_table_mappings = 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.