~gpanders/dotfiles

ref: 8bbb6b42ada8c7e573ffba9c35b376dd6bec1d15 dotfiles/vim/.vim/after/ftplugin/vimwiki.vim -rw-r--r-- 1.0 KiB
8bbb6b42Greg Anders Move weechat config directory to .config/weechat 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
" Vimwiki
setlocal textwidth=80
setlocal spell
setlocal complete+=k

let b:undo_ftplugin = 'setl tw< spell< cpt<'

" Replace default mappings
silent! nunmap <buffer> =
silent! nunmap <buffer> -
silent! nunmap <buffer> gl\*
silent! nunmap <buffer> <leader>whh
nmap <buffer> == <Plug>VimwikiAddHeaderLevel
nmap <buffer> -- <Plug>VimwikiRemoveHeaderLevel
nnoremap <silent> <buffer> gl* :VimwikiChangeSymbolTo \*<CR>
nmap <buffer> <leader>wb <Plug>Vimwiki2HTMLBrowse
nmap <buffer> >> <Plug>VimwikiIncreaseLvlSingleItem
nmap <buffer> << <Plug>VimwikiDecreaseLvlSingleItem

" Add mapping to compile entire wiki into HTML
nnoremap <silent> <buffer> <leader>wH :VimwikiAll2HTML<CR>

let b:undo_ftplugin = b:undo_ftplugin
      \ . '|nun <buffer> =='
      \ . '|nun <buffer> --'
      \ . '|nun <buffer> gl*'
      \ . '|nun <buffer> <leader>wb'
      \ . '|nun <buffer> >>'
      \ . '|nun <buffer> <<'
      \ . '|nun <buffer> <leader>wH'

if executable('dict')
  setlocal keywordprg=dict
  let b:undo_ftplugin .= '|setl kp<'
endif