Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2015
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. If you get tired of typing public class... and then the main method in vim
  2. then here is your solution. This also includes a skeleton for class documentation (author and version) that is compliant with Javadoc guidelines.
  3.  
  4. autocmd BufNewFile *.java
  5. \ 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"
  6.  
  7. Just insert it into your '.vimrc' and that's it! The next time you create a brand new Java file with 'vim *.java' you
  8. will see a template.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement