blob: b9186d6f5a66181bbfb94ba043ba4184ebbb857d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
" Rebind Ctrl-C in insert mode to undo the current insert operation
inoremap <C-c> <C-c>u
" Keep screeds of undo history
set undolevels=2000
" 'undodir' and 'undofile' settings will be taken care of by the
" auto_cache_dirs.vim plugin if applicable/possible
if has('persistent_undo')
" Turn off the option by default
set noundofile
" Don't keep undo files from temporary directories or shared memory in case
" they're secrets
if has('autocmd')
augroup dotfiles_undo_skip
autocmd!
autocmd BufWritePre
\ /tmp/*,$TMPDIR/*,$TMP/*,$TEMP/*,*/shm/*
\ setlocal noundofile
augroup END
endif
endif
|