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 @@
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" OpenChangedFiles COMMAND
" Open a split for each dirty file in git
"
" Shamelessly stolen from Gary Bernhardt: https://github.com/garybernhardt/dotfiles
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! OpenChangedFiles()
only " Close all windows, unless they're modified
let status = system('git status -s | grep "^ \?\(M\|A\)" | cut -d " " -f 3')
let filenames = split(status, "\n")
if len(filenames) > 0
exec "edit " . filenames[0]
for filename in filenames[1:]
exec "sp " . filename
endfor
end
endfunction
command! OpenChangedFiles :call OpenChangedFiles()
nnoremap ,ocf :OpenChangedFiles<CR>