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 / c.vim < prev    next >
Encoding:
Text File  |  2003-05-04  |  1.2 KB  |  47 lines

  1. " Vim filetype plugin file
  2. " Language:    C
  3. " Maintainer:    Bram Moolenaar <Bram@vim.org>
  4. " Last Change:    2003 May 04
  5.  
  6. " Only do this when not done yet for this buffer
  7. if exists("b:did_ftplugin")
  8.   finish
  9. endif
  10.  
  11. " Don't load another plugin for this buffer
  12. let b:did_ftplugin = 1
  13.  
  14. set cpo-=C
  15.  
  16. let b:undo_ftplugin = "setl cin< fo< com<"
  17.     \ . "| if has('vms') | setl isk< | endif"
  18.  
  19. setlocal cindent
  20.  
  21. " Set 'formatoptions' to break comment lines but not other lines,
  22. " and insert the comment leader when hitting <CR> or using "o".
  23. setlocal fo-=t fo+=croql
  24.  
  25. " Set 'comments' to format dashed lists in comments.
  26. setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
  27.  
  28. " In VMS C keywords contain '$' characters.
  29. if has("vms")
  30.   setlocal iskeyword+=$
  31. endif
  32.  
  33. " Win32 can filter files in the browse dialog
  34. if has("gui_win32") && !exists("b:browsefilter")
  35.   if &ft == "cpp"
  36.     let b:browsefilter = "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
  37.     \ "C Header Files (*.h)\t*.h\n" .
  38.     \ "C Source Files (*.c)\t*.c\n" .
  39.     \ "All Files (*.*)\t*.*\n"
  40.   else
  41.     let b:browsefilter = "C Source Files (*.c)\t*.c\n" .
  42.     \ "C Header Files (*.h)\t*.h\n" .
  43.     \ "C++ Source Files (*.cpp *.c++)\t*.cpp;*.c++\n" .
  44.     \ "All Files (*.*)\t*.*\n"
  45.   endif
  46. endif
  47.