" 20 the swap file
+let myUndoDir = expand('~/tmp/vim/undo')
+if !isdirectory(myUndoDir)
+ " Create dirs
+ call mkdir(myUndoDir, 'p')
+endif
+
" list of directories for the swap file; remove . (the current directory)
if has("win32")
- set directory=$TEMP//,c:/tmp//,c:/temp//
+ set directory=~/tmp/vim//,$TEMP//,c:/tmp//,c:/temp//
else
- set directory=~/tmp//,/var/tmp//,/tmp//
+ set directory=~/tmp/vim//,~/tmp//,/var/tmp//,/tmp//
endif
" if a directory ends in two path separators "//"
" or "\\", the swap file name will be built from the complete path to
set wildmenu " command-line completion shows a list of matches
set wildmode=longest,list:longest,full " Bash-vim completion behavior
+" Keep undo history across sessions by storing it in a file
+if has('persistent_undo')
+ let &undodir = myUndoDir
+ set undofile
+endif
+
" 22 executing external commands
if has("filterpipe")
endif
+if has("python")
+python << END_OF_PYTHON
+import sys, os
+
+virtualenv_dir = os.environ.get('VIRTUAL_ENV')
+if virtualenv_dir:
+ sys.path.insert(0, virtualenv_dir)
+ activate_this = os.path.join(virtualenv_dir, 'bin', 'activate_this.py')
+ execfile(activate_this, dict(__file__=activate_this))
+END_OF_PYTHON
+endif
+
+
" ----------
" From http://slobin.pp.ru/vim/_vimrc.html