]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
vim: `.hpp` is clearly the better extension for cpp files
[dotfiles.git] / vim / vimrc
index 6648b7d07aae490fdf7f568c8f76593333c78b64..8409f105aa3fd4482096f1daa87108dad5fee16b 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -69,6 +69,8 @@ Plugin 'ompugao/ctrlp-ros'
 Plugin 'vim-latex/vim-latex'
 Plugin 'alx741/vinfo'
 Plugin 'derekwyatt/vim-protodef'
 Plugin 'vim-latex/vim-latex'
 Plugin 'alx741/vinfo'
 Plugin 'derekwyatt/vim-protodef'
+Plugin 'ram-z/vim-clang-format'
+Plugin 'sgeb/vim-diff-fold'
 " needs editing colorscheme
 " Plugin 'jeaye/color_coded'
 " Check LucHermites plugins: https://github.com/LucHermitte/lh-cpp
 " needs editing colorscheme
 " Plugin 'jeaye/color_coded'
 " Check LucHermites plugins: https://github.com/LucHermitte/lh-cpp
@@ -216,8 +218,8 @@ set foldlevelstart=0            " value for 'foldlevel' when starting to edit a
 " open folds when jumping to line
 set foldopen+=jump
 
 " open folds when jumping to line
 set foldopen+=jump
 
-" save and restore folds
-set viewoptions=cursor          " only save cursor position
+set viewoptions=cursor          " save cursor position
+set viewoptions+=folds          " save folds
 
 " diff mode {{{2
 set diffopt+=filler         " show filler lines
 
 " diff mode {{{2
 set diffopt+=filler         " show filler lines
@@ -476,7 +478,7 @@ nnoremap [oe :set expandtab<CR>
 nnoremap ]oe :set noexpandtab<CR>
 
 for idt in range(1,8)
 nnoremap ]oe :set noexpandtab<CR>
 
 for idt in range(1,8)
-  exe 'nnoremap co'.idt.' :set tabstop='.idt.' shiftwidth='.idt.' softtabstop='.idt.'<CR>'
+  exe 'nnoremap co'.idt.' :setlocal tabstop='.idt.' shiftwidth='.idt.' softtabstop='.idt.'<CR>'
 endfor
 
 " toggle auto format of text
 endfor
 
 " toggle auto format of text
@@ -746,8 +748,8 @@ omap T <Plug>Sneak_T
 let g:vimwiki_list = [{'path': '$XDG_DATA_HOME/vimwiki'}]
 let g:vimwiki_auto_chdir = 1
 augroup myvimwiki
 let g:vimwiki_list = [{'path': '$XDG_DATA_HOME/vimwiki'}]
 let g:vimwiki_auto_chdir = 1
 augroup myvimwiki
-  au! BufRead            $XDG_DATA_HOME/vimwiki/index.wiki   !git pull
-  au! BufRead,BufNewFile $XDG_DATA_HOME/vimwiki/diary/*.wiki !git pull
+  au! BufRead            $XDG_DATA_HOME/vimwiki/index.wiki   !git -C "%:p:h" pull
+  au! BufRead,BufNewFile $XDG_DATA_HOME/vimwiki/diary/*.wiki !git -C "%:p:h" pull
   au! BufWritePost       $XDG_DATA_HOME/vimwiki/*.wiki       exe  '!git add "<afile>";git commit -m"' . strftime("%FT%R") . '";git push'
 augroup END
 
   au! BufWritePost       $XDG_DATA_HOME/vimwiki/*.wiki       exe  '!git add "<afile>";git commit -m"' . strftime("%FT%R") . '";git push'
 augroup END