]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
vim: also pull when reading diary entries
[dotfiles.git] / vim / vimrc
index 933806716e92557e5b4191a10fd934a010ebd03d..90fbf5d4e9e4e9556a3fc26f2e3ac9fe38486043 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -72,6 +72,8 @@ Plugin 'derekwyatt/vim-protodef'
 " needs editing colorscheme
 " Plugin 'jeaye/color_coded'
 " Check LucHermites plugins: https://github.com/LucHermitte/lh-cpp
+Plugin 'wincent/loupe'
+Plugin 'Ram-Z/vimwiki'
 
 call vundle#end()
 
@@ -156,10 +158,18 @@ set mouse=rnv                   " list of flags for using the mouse
 set ttymouse=xterm              " type of mouse
 
 " messages and info {{{2
-set showcmd                     " Show (partial) command in status line.
-set ruler                       " show the cursor position all the time
-set confirm                     " Ask what to do when closing unsaved documents
-set shortmess=filnxtoOI         " don't show intro message
+set showcmd         " Show (partial) command in status line.
+set ruler           " show the cursor position all the time
+set confirm         " Ask what to do when closing unsaved documents
+set shortmess=      " reset option
+set shortmess+=a    " all abbreviations
+set shortmess+=o    " overwrite file-written message
+set shortmess+=O    " file-read message overrides previous
+set shortmess+=t    " truncate file message at start
+set shortmess+=T    " truncate other messages in the middle
+set shortmess+=W    " don't give 'written' or '[w]' when writing a file
+set shortmess+=A    " ignore swapfile warning
+set shortmess+=I    " no splash screen
 
 " editing text {{{2
 set backspace=indent,eol,start  " allow backspacing over everything in insert mode
@@ -732,6 +742,15 @@ xmap T <Plug>Sneak_T
 omap t <Plug>Sneak_t
 omap T <Plug>Sneak_T
 
+" vimviki {{{2
+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      $XDG_DATA_HOME/vimwiki/diary/*.wiki !git pull
+  au! BufWritePost $XDG_DATA_HOME/vimwiki/*.wiki       exe  '!git add "<afile>";git commit -m"' . strftime("%FT%R") . '";git push'
+augroup END
+
 " functions {{{1
 
 " Convenient command to see the difference between the current buffer and the