robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
9ef80352b6
master
1" Vim filetype plugin file 2" Language: C# 3" Maintainer: Nick Jensen <nickspoon@gmail.com> 4" Former Maintainer: Johannes Zellner <johannes@zellner.org> 5" Last Change: 2025-03-14 6" License: Vim (see :h license) 7" Repository: https://github.com/nickspoons/vim-cs 8 9if exists ( 'b:did_ftplugin' ) 10finish 11endif 12let b: did_ftplugin = 1 13 14let s: save_cpo = & cpoptions 15set cpoptions & vim 16 17" Set 'formatoptions' to break comment lines but not other lines, 18" and insert the comment leader when hitting <CR> or using "o". 19setlocal formatoptions -= tformatoptions += croql 20 21" Set 'comments' to format dashed lists in comments. 22setlocal comments = sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// 23setlocal commentstring = //\ %s 24 25setlocal cinoptions = J1 26 27let b: undo_ftplugin = 'setl com< fo< cino<' 28 29if exists ( 'loaded_matchit' ) && ! exists ( 'b:match_words' ) 30" #if/#endif support included by default 31let b: match_ignorecase = 0 32let b: match_words = '\%(^\s*\)\@<=#\s*region\>:\%(^\s*\)\@<=#\s*endregion\>,' 33let b: undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words' 34endif 35 36if ( has ( 'gui_win32' ) || has ( 'gui_gtk' )) && ! exists ( 'b:browsefilter' ) 37let b: browsefilter = "C# Source Files (*.cs, *.csx)\t*.cs;*.csx\n" . 38 \"C# Project Files (*.csproj)\t*.csproj\n" . 39 \"Visual Studio Solution Files (*.sln)\t*.sln\n" 40if has ( "win32" ) 41let b: browsefilter ..= "All Files (*.*)\t*\n" 42else 43let b: browsefilter ..= "All Files (*)\t*\n" 44endif 45let b: undo_ftplugin .= ' | unlet! b:browsefilter' 46endif 47 48let & cpoptions = s: save_cpo 49unlet s: save_cpo 50 51" vim:et:sw=2:sts=2