diff options
Diffstat (limited to 'configs')
-rw-r--r-- | configs/vimwiki.vim | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/configs/vimwiki.vim b/configs/vimwiki.vim index 37eff6d..5481390 100644 --- a/configs/vimwiki.vim +++ b/configs/vimwiki.vim @@ -13,6 +13,16 @@ augroup pandoc_syntax autocmd! FileType vimwiki set syntax=markdown.pandoc augroup END -" Prevent remapping <CR> so i can interact with an open OmniCompletion popup -inoremap <expr> <CR> pumvisible() ? "\<CR>" : "<Esc>:VimwikiReturn 1 5<CR>" -inoremap <expr> <S-CR> pumvisible() ? "\<S-CR>" : "<Esc>:VimwikiReturn 2 2<CR>" +augroup ft_vimwiki + au! + + " Automatically generate a header for new wiki pages. + " NOTE: Waiting for g:vimwiki_auto_header to get added. Think it's still in the dev branch. + " Prevent remapping <CR> so i can interact with an open OmniCompletion popup: + " SOURCE: https://github.com/vimwiki/vimwiki/blob/master/doc/vimwiki.txt#L1491 + " SOURCE: https://github.com/vimwiki/vimwiki/issues/283 + au FileType vimwiki inoremap <silent> <buffer> <expr> <CR> + \ pumvisible() ? "\<CR>" : "<Esc>:VimwikiReturn 1 5<CR>" + au FileType vimwiki inoremap <silent> <buffer> <expr> <S-CR> + \ pumvisible() ? "\<S-CR>" : "<Esc>:VimwikiReturn 2 2<CR>" +augroup END |