robin/laufey
git clone https://git.robinwobin.dev/robin/laufey
0bb2f5cc08
master
1" Vim filetype plugin 2" Language: Stylus 3" Maintainer: Marc Harter 4" Credits: Tim Pope 5 6" Only do this when not done yet for this buffer 7if exists ( "b:did_ftplugin" ) 8finish 9endif 10 11let s: save_cpo = & cpo 12set cpo -= C 13 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,lua} ftplugin/html_*.{vim,lua} ftplugin/html/*.{vim,lua} 19unlet ! b: did_ftplugin 20 21" Override our defaults if these were set by an included ftplugin. 22if exists ( "b:undo_ftplugin" ) 23let s: undo_ftplugin = b: undo_ftplugin 24unlet b: undo_ftplugin 25endif 26if exists ( "b:browsefilter" ) 27let s: browsefilter = b: browsefilter 28unlet b: browsefilter 29endif 30 31" Change the browse dialog on Win32 to show mainly Styl-related files 32if has ( "gui_win32" ) 33let b: browsefilter = "Stylus Files (*.styl)\t*.styl\n" . s: browsefilter 34endif 35 36setlocal comments = commentstring = //\ %s 37setlocal suffixesadd = .styl 38setlocal formatoptions += r 39 40" Add '-' and '#' to the what makes up a keyword. 41" This means that 'e' and 'w' work properly now, for properties 42" and valid variable names. 43setl iskeyword += #,- 44 45" Add a Stylus command (to see if it's valid) 46command -buffer Stylus !clear; cat % |stylus 47 48 49let b: undo_ftplugin = "setl sua< isk< cms< com< fo< " 50 \" | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin 51 52let & cpo = s: save_cpo 53 54" vim:set sw=2: