Skip to content

Instantly share code, notes, and snippets.

@renatoalbano
Created October 24, 2016 16:58
Show Gist options
  • Save renatoalbano/acdc51c3eef6cc23352ed51f5e42db2e to your computer and use it in GitHub Desktop.
Save renatoalbano/acdc51c3eef6cc23352ed51f5e42db2e to your computer and use it in GitHub Desktop.
snip: open each file edited on last commit on vim tab
# open each file edited on last commit on vim tab
# git show head --name-only --oneline -> show files
# tail -n +2 -> cut first line (commit hash)
# tr '\n' ' ' -> replace break line to space
# vi -p open each file (space sep) on tab
vi -p $(git show head --name-only --oneline | tail -n +2 | tr '\n' ' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment