My vim configuration
git clone https://mcol.xyz/code/vim-misc
Log | Files | Refs | README

commit 890521ffddd642fb4c067e22f945afccf3698a91
parent d6a4b2fc18850966a14fd9e33c078989c4119453
Author: mcol <mcol@posteo.net>
Date:   Fri, 30 Nov 2018 23:19:34 +0000

added filetype files to misc

Diffstat:
Aftplugin/c.vim | 1+
Aftplugin/h.vim | 1+
Aftplugin/help.vim | 1+
Aftplugin/netrw.vim | 2++
Aftplugin/python.vim | 5+++++
Aftplugin/sh.vim | 6++++++
Aftplugin/vimwiki.vim | 52++++++++++++++++++++++++++++++++++++++++++++++++++++
7 files changed, 68 insertions(+), 0 deletions(-)

diff --git a/ftplugin/c.vim b/ftplugin/c.vim @@ -0,0 +1 @@ +nnoremap <buffer> <F2> :make!<CR> diff --git a/ftplugin/h.vim b/ftplugin/h.vim @@ -0,0 +1 @@ +setlocal filetype=c diff --git a/ftplugin/help.vim b/ftplugin/help.vim @@ -0,0 +1 @@ +nnoremap <buffer> <BS> :bd<CR> diff --git a/ftplugin/netrw.vim b/ftplugin/netrw.vim @@ -0,0 +1,2 @@ +map <buffer> h - +map <buffer> l <CR> diff --git a/ftplugin/python.vim b/ftplugin/python.vim @@ -0,0 +1,5 @@ +setlocal tabstop=4 +setlocal softtabstop=4 +setlocal shiftwidth=4 +setlocal textwidth=79 +setlocal expandtab diff --git a/ftplugin/sh.vim b/ftplugin/sh.vim @@ -0,0 +1,6 @@ +setlocal textwidth=79 + + +" use vim terminal as vimslime +"let g:slime_target = "vimterminal" +"let g:slime_target = "neovim" diff --git a/ftplugin/vimwiki.vim b/ftplugin/vimwiki.vim @@ -0,0 +1,52 @@ +"""" These commented commands are in vimrc, so ARE active: +""" split open index of vimwiki. +"nmap <Leader>wv :vsp<CR><Leader>ww + +"""" These commented commands are defaukts, so ARE active: +""" \ww opens it normally, which is default, in new buffer +"nmap <Leader>wh Vimwiki2HTML +"nmap <Leader>whh Vimwiki2HTMLBrowse + +" open index wiki in horizontal split +nmap <Leader>ws :sp<CR><Leader>ww + +" split follow link +nmap <Leader>s <Plug>VimwikiSplitLink +nmap <Leader>v <Plug>VimwikiVSplitLink + +" some html shortcuts +nmap <Leader>b msA<br><Esc>`s +nmap <Leader>i msI<i><Esc>A</i><Esc>`s +nmap <Leader>r mso<hr><Esc>`s +nmap <Leader>R msO<hr><Esc>`s + +" go to pages +nmap <Leader>gp /[[/papers/papers<CR><CR> +nmap <Leader>gl /[[/topics/learning<CR><CR> +nmap <Leader>gb /[[/topics/brain<CR><CR> +nmap <Leader>gd /[[/topics/direction<CR><CR> +nmap <Leader>gm /[[/topics/muscles<CR><CR> + +" save all as HTML +nmap <Leader>wa :VimwikiAll2HTML<CR> +nmap <Leader>wah :VimwikiAll2HTML<CR>:Vimwiki2HTMLBrowse<CR><CR> +" save as HTML and quit +nmap <Leader>wq :VimwikiAll2HTML<CR>WQ + +" follow next link +nmap g<CR> /[[<CR><CR> + +" paste copied bullet pointed link as title +nmap <Leader>p 0f\|yy<CR>Pdf\|$xx===o<CR> + +" open pdf from papers page +nmap <Leader>o 0f\|lvt]y:let a = substitute(@*, ' ', '_', 'g') \| !qpdfview --unique "~/work/research/papers/" . a . ".pdf" & + +" update papers page with new pdf files +nmap <Leader>u :!vimwiki_add_papers.sh<CR> + + + +setlocal textwidth=80 + +