diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2026-12-05 12:08:05 -0800 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2026-12-05 12:08:05 -0800 |
| commit | 43d20b9e16fd79e3ad8c6f9ee66d19eecb5f5d77 (patch) | |
| tree | ff9469983d502cb3cd52d96f377e80870d18a2f3 /.vimrc | |
| parent | Add vim-surround, fzf, fzf.vim plugins (diff) | |
| download | dotfiles-43d20b9e16fd79e3ad8c6f9ee66d19eecb5f5d77.zip | |
Configure backup, undo, and swap dirs for vim
Diffstat (limited to '.vimrc')
| -rw-r--r-- | .vimrc | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -13,6 +13,7 @@ endif " Enable a number column with numbers relative " to the current line the cursor is on. +set number set relativenumber " 1. Enable filetype detection to apply filetype-specific @@ -43,6 +44,15 @@ set incsearch " Show line/column number of cursor set ruler +" Setup home directory locations for vim temporary files +if empty($XDG_STATE_HOME) + let $XDG_STATE_HOME = $HOME.'/.local/state' +endif +set backupdir=$XDG_STATE_HOME/vim/backup// +set directory=$XDG_STATE_HOME/vim/swap// +set undodir=$XDG_STATE_HOME/vim/undo// +set undofile + " Enable the :Man command that ships with vim. runtime ftplugin/man.vim |