Skip to content

Instantly share code, notes, and snippets.

/vix

Created May 27, 2016 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3bd16c7d1f51ccbbd07238715c3f1486 to your computer and use it in GitHub Desktop.
Save anonymous/3bd16c7d1f51ccbbd07238715c3f1486 to your computer and use it in GitHub Desktop.
Function/alias to snap create an executable bash script with vim
vix() {
[ -e "$1" ] || echo -e '#!/bin/bash\n\n' > "$1";
chmod +x "$1";
vi "+normal G" +startinsert "$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment