home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / vim60.zip / vim60rt2.zip / vim / vim60 / ftplugin / java.vim < prev    next >
Text File  |  2001-09-26  |  2KB  |  51 lines

  1. " Vim filetype plugin file
  2. " Language:    Java
  3. " Maintainer:    Dan Sharp <vimuser@crosswinds.net>
  4. " Last Change:    Wed, 19 Sep 2001 16:27:23 Eastern Daylight Time
  5. " Current version is at http://sites.netscape.net/sharppeople/vim/ftplugin
  6.  
  7. " Only do this when not done yet for this buffer
  8. if exists("b:did_ftplugin")
  9.   finish
  10. endif
  11.  
  12. " Don't load another plugin for this buffer
  13. let b:did_ftplugin = 1
  14.  
  15. " Go ahead and set this to get decent indenting even if the indent files
  16. " aren't being used.
  17. setlocal cindent
  18.  
  19. "---------------------
  20. " From Johannes Zellner <johannes@zellner.org>
  21. setlocal cinoptions+=j1        " Correctly indent anonymous classes
  22. setlocal cinoptions+=+0        " Align continuation lines with the previous line
  23. "---------------------
  24.  
  25. " For filename completion, prefer the .java extension over the .class
  26. " extension.
  27. set suffixes+=.class
  28.  
  29. " Automatically add the java extension when searching for files, like with gf
  30. " or [i
  31. setlocal suffixesadd=.java
  32.  
  33. " Set 'formatoptions' to break comment lines but not other lines,
  34. " and insert the comment leader when hitting <CR> or using "o".
  35. setlocal fo-=t fo+=croql
  36.  
  37. " Set 'comments' to format dashed lists in comments
  38. setlocal com& com^=sO:*\ -,mO:*\ \ ,exO:*/  " Behaves just like C
  39.  
  40. " Make sure the continuation lines below do not cause problems in
  41. " compatibility mode.
  42. set cpo-=C
  43.  
  44. " Change the :browse e filter to primarily show Java-related files.
  45. if has("gui_win32") && !exists("b:browsefilter")
  46.     let  b:browsefilter="Java Files (*.java)\t*.java\n" .
  47.         \    "Properties Files (*.prop*)\t*.prop*\n" .
  48.         \    "Manifest Files (*.mf)\t*.mf\n" .
  49.         \    "All Files (*.*)\t*.*\n"
  50. endif
  51.