Created
January 18, 2015 17:47
-
-
Save ps/6ac0b69609661e3d8d6f to your computer and use it in GitHub Desktop.
Vim Skeleton Java Code
This file contains 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
If you get tired of typing public class... and then the main method in vim | |
then here is your solution. | |
autocmd BufNewFile *.java | |
\ exe "normal Opublic class " . expand('%:t:r') . " {\npublic static void main(String [] args) {\n\n}\n}\<Esc>1G" | |
Just insert it into your '.vimrc' and that's it! The next time you open a brand new Java file you | |
will see a template. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment