" 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
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
" python-mode {{{2
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