Revision | 0458a35a6b154f9a516eca39b4b1077099469ef2 (tree) |
---|---|
Time | 2023-04-13 16:10:59 |
Author | badcoff33 |
Commiter | badcoff33 |
use closeoff in diffopt
@@ -84,15 +84,14 @@ | ||
84 | 84 | set magic |
85 | 85 | set wrapscan |
86 | 86 | |
87 | -set backup | |
88 | -execute mkdir(getenv('LOCALAPPDATA') .. g:slash .. join(["vim", "backup"], g:slash) , "p") | |
89 | -execute 'set backupdir=' .. getenv('LOCALAPPDATA') .. '\vim\backup' | |
90 | -set wildignore+=*/backup/* | |
87 | +set writebackup | |
88 | +set nobackup | |
89 | +"execute mkdir(getenv('LOCALAPPDATA') .. g:slash .. join(["vim", "backup"], g:slash) , "p") | |
90 | +"execute 'set backupdir=' .. getenv('LOCALAPPDATA') .. '\vim\backup' | |
91 | 91 | |
92 | 92 | set undofile |
93 | 93 | execute mkdir(getenv('LOCALAPPDATA') .. g:slash .. join(["vim", "undo"], g:slash) , "p") |
94 | 94 | execute 'set undodir=' .. getenv('LOCALAPPDATA') .. '\vim\undo' |
95 | -set wildignore+=*/undo/* | |
96 | 95 | |
97 | 96 | " Insert mode completion |
98 | 97 | set complete=.,w |
@@ -111,7 +110,7 @@ | ||
111 | 110 | set tagcase=match |
112 | 111 | |
113 | 112 | " Tune the diff feature for my needs. |
114 | -set diffopt=internal,algorithm:minimal,context:8,vertical,iwhite,filler | |
113 | +set diffopt=internal,algorithm:minimal,context:8,vertical,iwhite,filler,closeoff | |
115 | 114 | " When starting in 'diff' mode, go full screen. |
116 | 115 | if &diff |
117 | 116 | set columns=999 lines=999 |
@@ -263,8 +262,8 @@ | ||
263 | 262 | vnoremap <Leader>s :s///gI<Left><Left><Left><Left> |
264 | 263 | |
265 | 264 | " commands |
266 | -nnoremap <Leader>f :find<Space> | |
267 | -nnoremap <Leader><Tab> :buffer<Space> | |
265 | +nnoremap <Leader>f :find<Space>* | |
266 | +nnoremap <Leader>b :buffer<Space> | |
268 | 267 | nnoremap <Leader>d <cmd>bdelete<CR> |
269 | 268 | |
270 | 269 | " Leader-t space |
@@ -298,7 +297,8 @@ | ||
298 | 297 | endif |
299 | 298 | endif |
300 | 299 | endfunction |
301 | -nnoremap <BS> <cmd>call <SID>ToggleQuickfix()<CR> | |
300 | +nnoremap <A-Space> <cmd>call <SID>ToggleQuickfix()<CR> | |
301 | +imap <A-Space> <Esc><A-Space> | |
302 | 302 | nnoremap <Leader>G <cmd>clast<CR> |
303 | 303 | |
304 | 304 | let g:ft2glob = { 'c':'*.[ch]$', 'vim':'*.vim', 'py':'*.py$', 'cmake':'*cmake*' } |
@@ -316,7 +316,7 @@ | ||
316 | 316 | autocmd InsertEnter * checktime |
317 | 317 | autocmd BufWinEnter * checktime |
318 | 318 | autocmd VimEnter * execute "colorscheme" ( (&term == "builtin_gui") ? "twotone" : "apollo" ) |
319 | - autocmd FocusLost * try | silent wall | catch /.*/ | endtry | |
319 | + "autocmd FocusLost * try | silent wall | catch /.*/ | endtry | |
320 | 320 | autocmd BufNewFile .vimrc execute "0read" g:vim_home.."\\templates\\local_vimrc" |
321 | 321 | augroup END " }}} |
322 | 322 |