My vim configuration
git clone https://github.com/m-col/vim-misc
Files | Refs | Readme

-rw-r--r-- start/self/ftplugin/vimwiki.vim


      1 """" These commented commands are in vimrc, so ARE active:
      2 """ split open index of vimwiki.
      3 "nmap <Leader>wv :vsp<CR><Leader>ww
      4 
      5 """" These commented commands are defaukts, so ARE active:
      6 """ \ww opens it normally, which is default, in new buffer
      7 "nmap <Leader>wh Vimwiki2HTML
      8 "nmap <Leader>whh Vimwiki2HTMLBrowse
      9 
     10 " open index wiki in horizontal split	
     11 nmap <buffer> <Leader>ws :sp<CR><Leader>ww
     12 
     13 " go to papers page
     14 nmap <buffer> <Leader>gp /[[/papers/papers<CR><CR>
     15 
     16 " save all as HTML
     17 nmap <buffer> <Leader>wa :VimwikiAll2HTML<CR>
     18 nmap <buffer> <Leader>wah :VimwikiAll2HTML<CR>:Vimwiki2HTMLBrowse<CR><CR>
     19 " save as HTML and quit
     20 nmap <buffer> <Leader>wq :VimwikiAll2HTML<CR>:wq<CR>
     21 
     22 " follow next link
     23 nmap <buffer> g<CR> /[[<CR><CR>
     24 
     25 " paste copied bullet pointed link as title
     26 nmap <buffer> <Leader>p 0f\|yy<CR>Pdf\|$xx===o<CR>
     27 
     28 " open pdf from papers page
     29 nmap <buffer> <Leader>o 0f\|lvt]y:let a = substitute(@*, ' ', '_', 'g') \| exec "!qpdfview --unique ~/work/research/papers/" . a . ".pdf &"<CR>
     30 
     31 " update papers page with new pdf files
     32 nmap <buffer> <Leader>u :!vimwiki_add_papers.sh<CR>
     33 
     34 " run goyo
     35 nmap <buffer> <Leader>g :Goyo<CR>
     36 
     37 
     38 setlocal wrap
     39 setlocal linebreak
     40 setlocal breakindent
     41 
     42 nnoremap <localleader>c :mkview<CR>gqip:silent loadview<CR>
     43