瀏覽代碼

Put vim state files in .cache

Thomas Dy 9 年之前
父節點
當前提交
23535a873c
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      .vimrc

+ 5 - 1
.vimrc

@@ -37,6 +37,11 @@ endfunction
 
 " ------ settings ------
 
+" xdg-ish settings
+set undodir=~/.cache/vim/undo,.
+set backupdir=~/.cache/vim/backup,.
+set directory=~/.cache/vim/swap,.
+
 " default indentation
 set shiftwidth=2
 set tabstop=4
@@ -44,7 +49,6 @@ set expandtab
 
 " permanent undo history
 set undofile
-set undodir=~/.vim/undo
 
 " allow switching buffers
 set hidden