]> git.zndr.dk Git - dotfiles.git/commitdiff
Save vim temporary files in .cache/vim
authorJannik Zander <jannikz@gmail.com>
Fri, 20 May 2016 19:33:43 +0000 (21:33 +0200)
committerJannik Zander <jannikz@gmail.com>
Fri, 20 May 2016 19:46:06 +0000 (21:46 +0200)
.cache/vim/backup/README.md [new file with mode: 0644]
.cache/vim/swap/README.md [new file with mode: 0644]
.cache/vim/undo/README.md [new file with mode: 0644]
.vimrc

diff --git a/.cache/vim/backup/README.md b/.cache/vim/backup/README.md
new file mode 100644 (file)
index 0000000..77b7d2e
--- /dev/null
@@ -0,0 +1 @@
+# Just an empty folder for vim backup files
diff --git a/.cache/vim/swap/README.md b/.cache/vim/swap/README.md
new file mode 100644 (file)
index 0000000..c5e7c56
--- /dev/null
@@ -0,0 +1 @@
+# Just an empty folder for vim swap files
diff --git a/.cache/vim/undo/README.md b/.cache/vim/undo/README.md
new file mode 100644 (file)
index 0000000..f10015a
--- /dev/null
@@ -0,0 +1 @@
+# Just an empty folder for vim undo files
diff --git a/.vimrc b/.vimrc
index b2e26bba8cc769609a298c1defbd76b083e6ad9b..a50ab71c40fdcc379de9ac180d59643c5eab6748 100644 (file)
--- a/.vimrc
+++ b/.vimrc
@@ -65,10 +65,10 @@ set smarttab        " sw at the start of the line, sts everywhere else
 setglobal tags=./tags;
 set timeoutlen=1200 " A little bit more time for macros
 set ttimeoutlen=50  " Make Esc work faster
-"if exists('+undofile')
-"  set undofile
-"endif
-set nobackup
+if exists('+undofile')
+  set undofile
+endif
+"set nobackup
 set visualbell
 set virtualedit=block
 set wildmenu
@@ -82,6 +82,11 @@ endif
 set background=light
 set number
 
+set undodir=~/.cache/vim/undo " vim will not create this directory.
+set directory=~/.cache/vim/swap " vim will not create this directory.
+set backupdir=~/.cache/vim/backup " vim will not create this directory.
+set viminfo+=n~/.cache/vim/viminfo
+
 " Plugin Settings {{{2
 
 
@@ -97,8 +102,9 @@ let g:fzf_launcher = "In_a_new_term_function %s"
 "let g:airline#extensions#tabline#enabled = 1
 
 let g:EditorConfig_exclude_patterns = ['fugitive://.*', 'scp://.*']
-let g:EditorConfig_verbose=1
+let g:EditorConfig_verbose=0
 let g:NERDTreeWinSize=30
+
 " }}}2
 " Section: Commands {{{1
 "-----------------------