neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

msmessages.vim (1313B)


      1 " Vim filetype plugin file
      2 " Language:	MS Message files (*.mc)
      3 " Maintainer:	Kevin Locke <kwl7@cornell.edu>
      4 " Last Change:	2008 April 09
      5 "		2024 Jan 14 by Vim Project (browsefilter)
      6 " Location:	http://kevinlocke.name/programs/vim/syntax/msmessages.vim
      7 
      8 " Based on c.vim
      9 
     10 " Only do this when not done yet for this buffer
     11 if exists("b:did_ftplugin")
     12  finish
     13 endif
     14 
     15 " Don't load another plugin for this buffer
     16 let b:did_ftplugin = 1
     17 
     18 " Using line continuation here.
     19 let s:cpo_save = &cpo
     20 set cpo-=C
     21 
     22 let b:undo_ftplugin = "setl fo< com< cms< | unlet! b:browsefilter"
     23 
     24 " Set 'formatoptions' to format all lines, including comments
     25 setlocal fo-=ct fo+=roql
     26 
     27 " Comments includes both ";" which describes a "comment" which will be
     28 " converted to C code and variants on "; //" which will remain comments
     29 " in the generated C code
     30 setlocal comments=:;,:;//,:;\ //,s:;\ /*\ ,m:;\ \ *\ ,e:;\ \ */
     31 setlocal commentstring=;\ //\ %s
     32 
     33 " Win32 and GTK can filter files in the browse dialog
     34 if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
     35  let b:browsefilter = "MS Message Files (*.mc)\t*.mc\n" .
     36 \ "Resource Files (*.rc)\t*.rc\n"
     37  if has("win32")
     38    let b:browsefilter .= "All Files (*.*)\t*\n"
     39  else
     40    let b:browsefilter .= "All Files (*)\t*\n"
     41  endif
     42 endif
     43 
     44 let &cpo = s:cpo_save
     45 unlet s:cpo_save