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. 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. |