]> git.rmz.io Git - dotfiles.git/blobdiff - vim/vimrc
awesome: bump net_widgets version
[dotfiles.git] / vim / vimrc
index 810f2f58f686c199a8ccd84bd7aeb3aaf4ba2783..681d32ac3e59bf58087f768bb44638dfdbf4bb17 100644 (file)
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -50,6 +50,7 @@ Plugin 'lokaltog/vim-easymotion'
 Plugin 'chrisbra/checkattach'
 Plugin 'klen/python-mode'
 Plugin 'nathanaelkane/vim-indent-guides'
+Plugin 'vim-scripts/yankring.vim'
 
 " remove entries first
 set runtimepath -=$HOME/.vim
@@ -169,19 +170,30 @@ set diffopt=filler,vertical
 " reading and writing files {{{2
 set modeline                    " read modelines
 set modelines=2                 " only check first/last 2 lines
+
 set writebackup                 " write a backup file before overwriting a file
 set backup                      " keep a backup after owerwriting a file
-set backupdir=$XDG_CACHE_HOME/vim//
+set backupdir=$XDG_CACHE_HOME/vim/backup//
+
+set backupskip+=.netrc          " skip netrc
+set backupskip+=/dev/shm/pass*  " skip passwordstore files
 
 set undofile                    " persistent undo history
-set undodir=$XDG_CACHE_HOME/vim//
+set undodir=$XDG_CACHE_HOME/vim/undo//
+
+augroup undoskip
+    au!
+    au BufWritePre .netrc         setlocal noundofile
+    au BufWritePre /dev/shm/pass* setlocal noundofile
+    au BufWritePre /tmp/*         setlocal noundofile
+augroup END
 
 set autowrite                   " automatically write a file when leaving a modified buffer
 set autoread                    " automatically read a file that has been modified
 
 " the swap file {{{2
 set noswapfile
-set directory=$XDG_CACHE_HOME/vim//
+set directory=$XDG_CACHE_HOME/vim/swap//
 
 " command line editing {{{2
 set history=5000                " how many command lines are remembered
@@ -202,7 +214,7 @@ set wildignore+=*.orig                           " Merge resolution files
 set virtualedit=block           " let cursor move past last char in <C-V> mode
 set viminfo='100,<50,s10,h,n$XDG_CACHE_HOME/vim/viminfo " viminfo defaults but save file in .cache
 
-set viewdir=$XDG_CACHE_HOME/vim
+set viewdir=$XDG_CACHE_HOME/vim/view//
 
 " autocmds {{{1
 " Resize splits when the window is resized {{{2
@@ -440,6 +452,8 @@ autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTree
 let g:pymode_rope_completion = 0
 let g:pymode_rope = 0
 let g:pymode_folding = 1
+let g:pymode_lint_ignore = "E221,E266,E501"
+let g:pymode_syntax_space_errors = 0    " don't bother me when I'm typing
 
 " synastic {{{2
 let g:syntastic_enable_highlighting = 0
@@ -470,6 +484,17 @@ let g:UltiSnipsExpandTrigger = "<C-L>"
 let g:UltiSnipsJumpForwardTrigger = "<C-L>"
 let g:UltiSnipsJumpBackwardTrigger = "<C-H>"
 
+" yankring {{{2
+nnoremap <silent> <leader>p :YRShow<cr>
+let g:yankring_history_dir = expand('$XDG_CACHE_HOME/vim')
+let g:yankring_replace_n_pkey = ''
+let g:yankring_replace_n_nkey = ''
+
+" map Y to y$ for the yank ring
+function! YRRunAfterMaps()
+    nnoremap Y   :<C-U>YRYankCount 'y$'<CR>
+endfunction
+
 " youcompleteme {{{2
 let g:ycm_extra_conf_globlist = ['~/src/*','/mnt/data/src/*']
 let g:ycm_global_ycm_extra_conf = expand('$XDG_CONFIG_HOME/vim/ycm_extra_conf.py')