Created
November 15, 2011 15:40
-
-
Save jameskyle/1367364 to your computer and use it in GitHub Desktop.
Insert shebang at the top of new script files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
augroup Shebang | |
au! | |
autocmd BufNewFile *.py 0put =\"#!/usr/bin/env python\<nl># -*- coding: iso-8859-15 -*-\<nl>\"|$ | |
autocmd BufNewFile *.rb 0put =\"#!/usr/bin/env ruby\<nl># -*- coding: None -*-\<nl>\"|$ | |
autocmd BufNewFile *.tex 0put =\"%&plain\<nl>\"|$ | |
autocmd BufNewFile *.\(cc\|hh\) 0put =\"//\<nl>// \".expand(\"<afile>:t\").\" -- \<nl>//\<nl>\"|2|start! | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment