codekingpro/portable-devtools
114k
1" Vim filetype plugin2" Language: Stylus3" Maintainer: Marc Harter4" Credits: Tim Pope5 6" Only do this when not done yet for this buffer7if exists("b:did_ftplugin")8 finish9endif10 11let s:save_cpo = &cpo12set cpo-=C13 14" Define some defaults in case the included ftplugins don't set them.15let s:undo_ftplugin = ""16let s:browsefilter = "All Files (*.*)\t*.*\n"17 18runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim19unlet! b:did_ftplugin20 21" Override our defaults if these were set by an included ftplugin.22if exists("b:undo_ftplugin")23 let s:undo_ftplugin = b:undo_ftplugin24 unlet b:undo_ftplugin25endif26if exists("b:browsefilter")27 let s:browsefilter = b:browsefilter28 unlet b:browsefilter29endif30 31" Change the browse dialog on Win32 to show mainly Styl-related files32if has("gui_win32")33 let b:browsefilter="Stylus Files (*.styl)\t*.styl\n" . s:browsefilter34endif35 36setlocal comments= commentstring=//\ %s37setlocal suffixesadd=.styl38setlocal formatoptions+=r39 40" Add '-' and '#' to the what makes up a keyword.41" This means that 'e' and 'w' work properly now, for properties42" and valid variable names.43setl iskeyword+=#,-44 45" Add a Stylus command (to see if it's valid)46command -buffer Stylus !clear; cat % |stylus47 48 49let b:undo_ftplugin = "setl sua< isk< cms< com< fo< "50 \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin51 52let &cpo = s:save_cpo53 54" vim:set sw=2:55 