mirror of
https://github.com/artizirk/dotfiles.git
synced 2024-12-22 19:40:15 +02:00
Add vim swap file support
This commit is contained in:
parent
0392826855
commit
82421cba37
20
.config/nvim/swap.vim
Normal file
20
.config/nvim/swap.vim
Normal file
@ -0,0 +1,20 @@
|
||||
" Protect changes between writes. Default values of
|
||||
" updatecount (200 keystrokes) and updatetime
|
||||
" (4 seconds) are fine
|
||||
set swapfile
|
||||
set directory^=~/.config/nvim/swap//
|
||||
|
||||
" protect against crash-during-write
|
||||
set writebackup
|
||||
" but do not persist backup after successful write
|
||||
set nobackup
|
||||
" use rename-and-write-new method whenever safe
|
||||
set backupcopy=auto
|
||||
|
||||
" consolidate the writebackups -- not a big
|
||||
" deal either way, since they usually get deleted
|
||||
set backupdir^=~/.config/nvim/backup//
|
||||
|
||||
" persist the undo tree for each file
|
||||
set undofile
|
||||
set undodir^=~/.config/nvim/undo//
|
Loading…
Reference in New Issue
Block a user