Skip to content

Instantly share code, notes, and snippets.

View pfandzelter's full-sized avatar
🧑‍🎓

Tobias Pfandzelter pfandzelter

🧑‍🎓
View GitHub Profile
@pfandzelter
pfandzelter / gist:b09be56789814f5ee332
Last active August 29, 2015 14:19 — forked from ps/gist:6ac0b69609661e3d8d6f
Java skeleton for vim
If you get tired of typing public class... and then the main method in vim
then here is your solution. This also includes a skeleton for class documentation (author and version) that is compliant with Javadoc guidelines.
autocmd BufNewFile *.java
\ exe "normal O/**\r*\r* @author: \r* @version: \r* \r*/\r\rpublic class " . expand('%:t:r') . "\r public static void main(String[] args){\r\r }\r}\<Esc>1G"
Just insert it into your '.vimrc' and that's it! The next time you create a brand new Java file with 'vim *.java' you
will see a template.