diff options
author | listout <listout@protonmail.com> | 2021-05-31 13:06:35 +0530 |
---|---|---|
committer | listout <listout@protonmail.com> | 2021-05-31 13:06:35 +0530 |
commit | 6bec8d473b2fb7fecfe7fc18f58eea7b95ac9058 (patch) | |
tree | 7c7f2a7fe0c5b374ea58d8c30b8955db05dbd919 /configs | |
parent | eb77ef1d7bd491f04ba8e93c7918d43b7bff973c (diff) |
use settings only in groups; augroup
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 |