Skip to content

Instantly share code, notes, and snippets.

@fukata
Created January 12, 2012 17:39
Show Gist options
  • Save fukata/1601979 to your computer and use it in GitHub Desktop.
Save fukata/1601979 to your computer and use it in GitHub Desktop.
vimplus
#!/bin/bash
VIM=/usr/bin/vim
FILE=${1%:*}
LINE=${1#*:}
if [[ "$LINE" =~ ^[0-9]+$ ]]
then
$VIM +"$LINE" "$FILE"
else
$VIM "$FILE"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment