|
@@ -98,3 +98,19 @@ set autoindent
|
98
|
98
|
|
99
|
99
|
set pastetoggle=<F4>
|
100
|
100
|
nmap <F3> :set invnumber<CR>
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+" ###############################################################################
|
|
104
|
+" ## from http://stackoverflow.com/a/9528322/835945
|
|
105
|
+" ###############################################################################
|
|
106
|
+
|
|
107
|
+" Save your swp files to a less annoying place than the current directory.
|
|
108
|
+" If you have .vim-swap in the current directory, it'll use that.
|
|
109
|
+" Otherwise it saves it to ~/.vim/swap, ~/tmp or .
|
|
110
|
+if isdirectory($HOME . '/.local/share/vim') == 0
|
|
111
|
+ :silent !mkdir -p ~/.vim/swap >/dev/null 2>&1
|
|
112
|
+ endif
|
|
113
|
+ set directory=./.vim-swap//
|
|
114
|
+ set directory+=~/.local/share/vim//
|
|
115
|
+ set directory+=~/tmp//
|
|
116
|
+ set directory+=.
|