codekingpro/portable-devtools
115k
1" Vim filetype plugin file2" Language: TypeScript3" Maintainer: Doug Kearns <dougkearns@gmail.com>4" Last Change: 2024 Jan 145" 2024 May 23 by Riley Bruins <ribru17@gmail.com> ('commentstring')6 7if exists("b:did_ftplugin")8 finish9endif10let b:did_ftplugin = 111 12let s:cpo_save = &cpo13set cpo-=C14 15" Set 'formatoptions' to break comment lines but not other lines,16" and insert the comment leader when hitting <CR> or using "o".17setlocal formatoptions-=t formatoptions+=croql18 19" Set 'comments' to format dashed lists in comments.20setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://21 22setlocal commentstring=//\ %s23 24setlocal suffixesadd+=.ts,.d.ts,.tsx,.js,.jsx,.cjs,.mjs25 26let b:undo_ftplugin = "setl fo< com< cms< sua<"27 28" Change the :browse e filter to primarily show TypeScript-related files.29if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")30 let b:browsefilter="TypeScript Files (*.ts)\t*.ts\n" .31 \ "TypeScript Declaration Files (*.d.ts)\t*.d.ts\n" .32 \ "TSX Files (*.tsx)\t*.tsx\n" .33 \ "JavaScript Files (*.js)\t*.js\n" .34 \ "JavaScript Modules (*.es, *.cjs, *.mjs)\t*.es;*.cjs;*.mjs\n" .35 \ "JSON Files (*.json)\t*.json\n"36 if has("win32")37 let b:browsefilter .= "All Files (*.*)\t*\n"38 else39 let b:browsefilter .= "All Files (*)\t*\n"40 endif41 let b:undo_ftplugin .= " | unlet! b:browsefilter"42endif43 44let &cpo = s:cpo_save45unlet s:cpo_save46 