home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / ftplugin / java.vim < prev    next >
Encoding:
Text File  |  2003-05-02  |  1.5 KB  |  51 lines

  1. " Vim filetype plugin file
  2. " Language:    Java
  3. " Maintainer:    Dan Sharp <dwsharp at hotmail dot com>
  4. " Last Change:  2003 May 02
  5. " URL:        http://mywebpage.netscape.com/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. "---------------------
  23.  
  24. " For filename completion, prefer the .java extension over the .class
  25. " extension.
  26. set suffixes+=.class
  27.  
  28. " Automatically add the java extension when searching for files, like with gf
  29. " or [i
  30. setlocal suffixesadd=.java
  31.  
  32. " Set 'formatoptions' to break comment lines but not other lines,
  33. " and insert the comment leader when hitting <CR> or using "o".
  34. setlocal formatoptions-=t formatoptions+=croql
  35.  
  36. " Set 'comments' to format dashed lists in comments
  37. setlocal comments& comments^=sO:*\ -,mO:*\ \ ,exO:*/  " Behaves just like C
  38.  
  39. setlocal commentstring=//%s
  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.