set bufhidden=wipe to all unnamed buffers, not just the first

This commit is contained in:
Josh Holtrop 2013-11-20 12:55:13 -05:00
parent 5e759dce1a
commit 124baaeb85

5
vimrc
View File

@ -34,9 +34,6 @@ set background=dark
set showtabline=1 set showtabline=1
set cinoptions=:0,(0 set cinoptions=:0,(0
set hidden set hidden
if bufname('%') == ''
set bufhidden=wipe
endif
runtime ftplugin/man.vim runtime ftplugin/man.vim
nnoremap K :Man <cword><CR> nnoremap K :Man <cword><CR>
@ -123,6 +120,8 @@ if has("autocmd")
autocmd BufNewFile,BufRead *.[ch].erb setlocal sw=4 ts=4 sts=4 autocmd BufNewFile,BufRead *.[ch].erb setlocal sw=4 ts=4 sts=4
autocmd BufRead,BufNewFile *.oil,*.OIL set filetype=oil autocmd BufRead,BufNewFile *.oil,*.OIL set filetype=oil
autocmd BufEnter * if bufname('%') == '' | set bufhidden=wipe | endif
if has("gui_running") if has("gui_running")
autocmd WinLeave * set nocursorline nocursorcolumn autocmd WinLeave * set nocursorline nocursorcolumn
autocmd WinEnter * set cursorline cursorcolumn autocmd WinEnter * set cursorline cursorcolumn