Edit all modified files in VIM
I wanted a way to easily edit all the files in my modfied list from running
git status
so I came up with this nifty little shortcut
vim $(git status -s -uno --ignore-submodules -z | sed 's/ M//g')
A little explanation about the switches used.
-s -- short version
-uno -- show 'untracked' set to no
-ignore-submodules -- don't look in submodules
-z -- use a NUL instead of a LF
sed 's/ M///g' -- remove the remaining 'Modified' flag
I already have my vim set to vim -p
so it opens in tabs as I like.
Written by Rob W
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#