Move vim settings out of plugins to ensure they all get correctly loaded after everything else [Fix #373]

This commit is contained in:
Yan Pritzker
2013-10-21 16:10:40 -05:00
parent 65a3ec3219
commit 46946c9b8b
55 changed files with 15 additions and 8 deletions

View File

@@ -0,0 +1,20 @@
" Use Q to intelligently close a window
" (if there are multiple windows into the same buffer)
" or kill the buffer entirely if it's the last window looking into that buffer
function! CloseWindowOrKillBuffer()
let number_of_windows_to_this_buffer = len(filter(range(1, winnr('$')), "winbufnr(v:val) == bufnr('%')"))
" We should never bdelete a nerd tree
if matchstr(expand("%"), 'NERD') == 'NERD'
wincmd c
return
endif
if number_of_windows_to_this_buffer > 1
wincmd c
else
bdelete
endif
endfunction
nnoremap <silent> Q :call CloseWindowOrKillBuffer()<CR>