codekingpro/portable-devtools
114k
1" Vim filetype plugin file2" Language: C#3" Maintainer: Nick Jensen <nickspoon@gmail.com>4" Former Maintainer: Johannes Zellner <johannes@zellner.org>5" Last Change: 2025-03-146" License: Vim (see :h license)7" Repository: https://github.com/nickspoons/vim-cs8 9if exists('b:did_ftplugin')10 finish11endif12let b:did_ftplugin = 113 14let s:save_cpo = &cpoptions15set cpoptions&vim16 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-=t formatoptions+=croql20 21" Set 'comments' to format dashed lists in comments.22setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://23setlocal commentstring=//\ %s24 25setlocal cinoptions=J126 27let b:undo_ftplugin = 'setl com< fo< cino<'28 29if exists('loaded_matchit') && !exists('b:match_words')30 " #if/#endif support included by default31 let b:match_ignorecase = 032 let b:match_words = '\%(^\s*\)\@<=#\s*region\>:\%(^\s*\)\@<=#\s*endregion\>,'33 let b:undo_ftplugin .= ' | unlet! b:match_ignorecase b:match_words'34endif35 36if (has('gui_win32') || has('gui_gtk')) && !exists('b:browsefilter')37 let 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"40 if has("win32")41 let b:browsefilter ..= "All Files (*.*)\t*\n"42 else43 let b:browsefilter ..= "All Files (*)\t*\n"44 endif45 let b:undo_ftplugin .= ' | unlet! b:browsefilter'46endif47 48let &cpoptions = s:save_cpo49unlet s:save_cpo50 51" vim:et:sw=2:sts=252 