Syntax highlighting for SableCC grammars in Vim

28 views
Skip to first unread message

Elvis Stansvik

unread,
Feb 25, 2014, 1:40:38 PM2/25/14
to sab...@googlegroups.com
Hi folks,

I wrote a (very) simple SableCC grammar syntax file for Vim, in case anyone is interested. Save the attached file in ~/.vim/syntax and put

au BufRead,BufNewFile *.sablecc set filetype=sablecc

in a new file ~/.vim/ftdetect/sablecc.vim to activate it for *.sablecc files.

Here's what it looks like:


Cheers,
Elvis
sablecc.vim

Phuc

unread,
Feb 25, 2014, 1:51:57 PM2/25/14
to sab...@googlegroups.com
Well, why didn't you asked before. I wrote one for years. It is in vim plugin portal and github.
--
-- You received this message because you are subscribed to the SableCC group. To post to this group, send email to sab...@googlegroups.com. To unsubscribe from this group, send email to sablecc+u...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/sablecc?hl=en
---
You received this message because you are subscribed to the Google Groups "SableCC" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sablecc+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Elvis Stansvik

unread,
Feb 25, 2014, 3:21:50 PM2/25/14
to sab...@googlegroups.com
2014-02-25 19:51 GMT+01:00 Phuc <phuc...@gmail.com>:
Well, why didn't you asked before. I wrote one for years. It is in vim plugin portal and github.

Woops! How silly. Oh well :)

Elvis

Elvis Stansvik

unread,
Feb 27, 2014, 1:34:18 PM2/27/14
to sab...@googlegroups.com
2014-02-25 21:21 GMT+01:00 Elvis Stansvik <elvs...@gmail.com>:
2014-02-25 19:51 GMT+01:00 Phuc <phuc...@gmail.com>:

Well, why didn't you asked before. I wrote one for years. It is in vim plugin portal and github.

Woops! How silly. Oh well :)

After having used Phuc's highlighting for a while, I realize that it's much better than mine. So my recommendation is: Use his and disregard my previous mail!

Elvis
Reply all
Reply to author
Forward
0 new messages