Skip to content

Commit

Permalink
Vim persistent undo
Browse files Browse the repository at this point in the history
  • Loading branch information
sushengloong committed Nov 20, 2017
1 parent 6aa9b1f commit e86ff88
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
# Then launch vim and run :PlugInstall to install all the vim plugins
```

### Create dedicated directory for vim undo history files
```
mkdir ~/.vim/undodir
```

### Install and use CMake to compile YouCompleteMe Vim plugin:
```
brew install cmake
Expand Down
6 changes: 6 additions & 0 deletions vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ call plug#end()
set background=dark
colorscheme solarized

" Enable persistent undo
set undodir=~/.vim/undodir
set undofile
set undolevels=1000
set undoreload=10000

" Detect and auto-reload file changes
set autoread
au CursorHold * checktime
Expand Down

0 comments on commit e86ff88

Please sign in to comment.