3214 Posts in 848 Topics by 810 members
|Go to End|
24 March 2009 at 2:39pm
This really annoyed me and I fixed it, so I thought I'd share.
I use gvim under Ubuntu to do all my coding. gvim associates *.ss with some other file type, so the syntax highlighting wasn't correct and it wasn't auto-indenting at all.
I edited /usr/share/vim/vim71/filetypes.vim - do a text search for "Scheme" and you should see this:
au BufNewFile,BufRead *.scm,*.ss setf scheme
For me it was on line 1670.
Comment it out with a double-quotation (") and load a .ss file - it'll now use the xhtml file type for syntax and indentation instead.
There's probably a better way to do this... but I've got work to do!
I hope this helps someone
4 August 2009 at 6:49pm
I think I found a better way to do this.
In ~/.vim/filetype.vim (you might need to create it) put:
au BufNewFile,BufRead *.ss setf xhtml
and now when you open Silverstripe template files it'll give you html syntax highlighting.
28 June 2012 at 8:58am
Nice! It works and it is better way of doing this. Did you figure out how to format suntax automatically (=) for ss files so at least it puts the <% %> tags as nested?
|Go to Top|