Skip to content

Commit

Permalink
[vim] auto-create undo folder for persistent undo...
Browse files Browse the repository at this point in the history
again just for a first-run situation....may complicate windows vim setup
tho
  • Loading branch information
tonywoode committed Aug 24, 2020
1 parent bed6713 commit 5e23463
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,12 @@ set autoindent
set smartindent

" Persistent undo https://stackoverflow.com/a/26702442/3536094
" YOU must mkdir ~/.vim/undo
" YOU must mkdir ~/.vim/undo, so ensure folder exists NIX ONLY shell. Note use of $ var not a vim set or let var,
" its just easiest see https://vi.stackexchange.com/a/17451
let $undoFolder = $HOME.'/.vim/undo'
silent ! [[ -d $undoFolder ]] || mkdir $undoFolder
set undofile
set undodir=$HOME/.vim/undo
set undodir=$undoFolder
set undolevels=1000
set undoreload=10000

Expand Down

0 comments on commit 5e23463

Please sign in to comment.