From 8bbfbf3365159c670b3a634f2fbb11af0ca181d0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 28 Oct 2017 21:27:51 +1300 Subject: Move undo .vimrc config into subfile Interestingly, this does not seem to work, and this configuration doesn't get loaded; I suspect the :runtime line is not quite right. --- vim/vimrc | 33 --------------------------------- 1 file changed, 33 deletions(-) (limited to 'vim/vimrc') diff --git a/vim/vimrc b/vim/vimrc index 9cbf309d..c3118f71 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -58,9 +58,6 @@ endif " the open buffers; I'll open the file if I want to complete from it set complete-=i -" Rebind Ctrl-C in insert mode to undo the current insert operation -inoremap u - " A few very important custom digraphs if has('digraphs') digraph ./ 8230 " Ellipsis (HORIZONTAL ELLIPSIS U+2026) @@ -344,36 +341,6 @@ if has('user_commands') command! -bang WA wa endif -" Keep screeds of undo history -set undolevels=2000 - -" Keep undo history in a separate file if the feature is available, we're on -" Unix, and not using sudo(8); this goes really well with undo visualization -" plugins like Gundo or Undotree. -if !strlen($SUDO_USER) && has('unix') && has('persistent_undo') - - " Keep per-file undo history in ~/.vim/undo; the double-slash at the end - " of the directory prods Vim into keeping the full path to the file in its - " undo filename to avoid collisions; the same thing works for swap files - set undofile - set undodir^=~/.vim/undo// - - " Create the ~/.vim/undo directory if necessary and possible - if !isdirectory($HOME . '/.vim/undo') && exists('*mkdir') - call mkdir($HOME . '/.vim/undo', 'p', 0700) - endif - - " Don't track changes to sensitive files - if has('autocmd') - augroup undoskip - autocmd! - silent! autocmd BufWritePre - \ /tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/* - \ setlocal noundofile - augroup END - endif -endif - " When in visual block mode, let me move the cursor anywhere in the buffer; " don't restrict me only to regions with text if has('virtualedit') -- cgit v1.2.3