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 / csh.vim < prev    next >
Encoding:
Text File  |  2003-05-20  |  1.3 KB  |  36 lines

  1. " Vim filetype plugin file
  2. " Language:    csh
  3. " Maintainer:    Dan Sharp <dwsharp at hotmail dot com>
  4. " Last Changed: 2003 May 20
  5. " URL:        http://mywebpage.netscape.com/sharppeople/vim/ftplugin
  6.  
  7. if exists("b:did_ftplugin") | finish | endif
  8. let b:did_ftplugin = 1
  9.  
  10. setlocal commentstring=#%s
  11. setlocal formatoptions-=t
  12. setlocal formatoptions+=crql
  13.  
  14. " Csh:  thanks to Johannes Zellner
  15. " - Both foreach and end must appear alone on separate lines.
  16. " - The words else and endif must appear at the beginning of input lines;
  17. "   the if must appear alone on its input line or after an else.
  18. " - Each case label and the default label must appear at the start of a
  19. "   line.
  20. " - while and end must appear alone on their input lines.
  21. if exists("loaded_matchit") && !exists("b:match_words")
  22.     let b:match_words =
  23.       \ '^\s*\<if\>.*(.*).*\<then\>:'.
  24.       \   '^\s*\<else\>\s\+\<if\>.*(.*).*\<then\>:^\s*\<else\>:'.
  25.       \   '^\s*\<endif\>,'.
  26.       \ '\%(^\s*\<foreach\>\s\+\S\+\|^s*\<while\>\).*(.*):'.
  27.       \   '\<break\>:\<continue\>:^\s*\<end\>,'.
  28.       \ '^\s*\<switch\>.*(.*):^\s*\<case\>\s\+:^\s*\<default\>:^\s*\<endsw\>'
  29. endif
  30.  
  31. " Change the :browse e filter to primarily show csh-related files.
  32. if has("gui_win32") && !exists("b:browsefilter")
  33.     let  b:browsefilter="csh Scripts (*.csh)\t*.csh\n" .
  34.         \    "All Files (*.*)\t*.*\n"
  35. endif
  36.