Skip to content

Instantly share code, notes, and snippets.

@migrs
Created December 13, 2012 05:06
Show Gist options
  • Save migrs/4274177 to your computer and use it in GitHub Desktop.
Save migrs/4274177 to your computer and use it in GitHub Desktop.
特定のリビジョンのファイルを Vim シンタックスハイライト付きで閲覧する
#!/bin/sh
git show $1 | vim -R +"f $1" +"filetype detect" -
# Install:
# copy to $PATH and chmod +x
#
# Usage:
# git view <revision>:<path/to/file>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment