diff options
| -rw-r--r-- | vimrc | 7 | ||||
| -rw-r--r-- | zshrc | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -22,6 +22,7 @@ call dein#add('scrooloose/nerdtree', \{'on_cmd': 'NERDTreeToggle'}) call dein#add('justmao945/vim-clang', \{'on_ft': ['c', 'cpp']}) +call dein#add('mbbill/undotree') call dein#end() filetype plugin indent on @@ -39,6 +40,10 @@ let g_clang_cpp_options = '-std=c++11 -stdlib=libc++' let g:VimuxHeight = "10" let g:VimuxOrientation = "v" let g:VimuxPromptString = ":!" +if has("persistent_undo") + set undodir=~/.cache/vim/undo + set undofile +endif " Encoding set encoding=utf-8 @@ -77,6 +82,8 @@ nmap <F3> :VimuxPromptCommand<CR> nmap <F4> :VimuxRunLastCommand<CR> " - toggle tags browser with F8 nmap <F8> :TagbarToggle<CR> +" - toggle undo history with F5 +nmap <F5> :UndotreeToggle<CR> " Highlight extra whitespaces highlight ExtraWhitespace ctermbg=red @@ -36,4 +36,4 @@ bindkey "${terminfo[kend]}" end-of-line # Make sure required directories exist # ----------------------------------------------------------------------------- -mkdir -p "${HOME}/.cache/vim" +mkdir -p "${HOME}/.cache/vim/undo" |
