aboutsummaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-02 11:38:26 +0800
committerGuangxiong Lin <[email protected]>2022-04-02 11:38:26 +0800
commit79a18bae6aaba8ebae01915df8b425ba3e5a88e5 (patch)
tree63eca4e09e3d846a81bf780486d3edac47d6f8ee /.vimrc
parent797af75cbd0b7edac91cdc9b1409f92671e21dfa (diff)
downloaddotfiles-79a18bae6aaba8ebae01915df8b425ba3e5a88e5.tar.gz
dotfiles-79a18bae6aaba8ebae01915df8b425ba3e5a88e5.tar.bz2
dotfiles-79a18bae6aaba8ebae01915df8b425ba3e5a88e5.zip
Set undofile in vim
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index e41b2b1..35b6c40 100644
--- a/.vimrc
+++ b/.vimrc
@@ -27,6 +27,13 @@ set completepopup=align:menu,border:off,highlight:WildMenu
set diffopt+=followwrap
+" undo
+if !isdirectory(expand('~/.vim/.undo'))
+ silent! call mkdir(expand('~/.vim/.undo', 'p'))
+endif
+set undodir=~/.vim/.undo//
+set undofile
+
" set Vim-specific sequences for RGB colors
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"