Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erb haml coffee syntax highlight #41

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 25 additions & 22 deletions misc/syntax/Syntax.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ include diff.syntax
file ..\*\\.lsm$ LSM\sFile
include lsm.syntax

file .\*(bash_completion|profile|\\.(sh|bash_login|bash_profile|bash_logout|bash_aliases|bash_exports|bash_history|bashrc|profile|zlogin|zlogout|zprofile|zshenv|zshrc))$ Shell\sScript ^#!\s\*/(.\*/|usr/bin/env\s)([a-z]?|ba|pdk)sh
file .\*(bash_completion|profile|\\.(sh|bash_login|bash_profile|bash_logout|bash_aliases|bash_exports|bash_history|bashrc|profile))$ Shell\sScript ^#!\s\*/(.\*/|usr/bin/env\s)([a-z]?|ba|pdk)sh
include sh.syntax

file ..\*\\.(pl|PL|pm|PM|psgi|PSGI)$ Perl\sProgram ^#!.\*([\s/]perl|@PERL@)
file ..\*\\.(pl|PL|pm|PM)$ Perl\sProgram ^#!.\*([\s/]perl|@PERL@)
include perl.syntax

file ..\*\\.(py|PY)$ Python\sProgram ^#!.\*([\s/]python|@PYTHON@)
Expand All @@ -49,12 +49,24 @@ include python.syntax
file ..\*\\.(pyx|pxd|pxi)$ Cython\sor\sPyrex\sProgram
include cython.syntax

file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@)
file ..\*\\.(rb|RB|rake|RAKE|jbuilder|rabl)|Gemfile$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@) Rakefile
include ruby.syntax

file ..\*\\.(yml|feature)$ Cucumber\sfeature ^#!.\*([\s/]cucumber|@CUCUMBER@) Feature
include cucumber.syntax

file ..\*\\.(man|[0-9n]|[0-9](x|ncurses|ssl|p|pm|menu|form|vga|t|td))$ NROFF\sSource
include nroff.syntax

file ..\*\\.(html\.erb)$ Rails\serb\stemplate
include erb.syntax

file ..\*\\.(html\.haml)$ Rails\shaml\stemplate
include haml.syntax

file ..\*\\.(skim\.erb)$ Rails\sskim\serb\stemplate
include ruby.syntax

file ..\*\\.(htm|html|HTM|HTML)$ HTML\sFile
include html.syntax

Expand All @@ -64,12 +76,9 @@ include xml.syntax
file ..\*\\.(tt|TT)$ Template::Toolkit\sFile
include tt.syntax

file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|..\*\\.mak|Kbuild)$ Makefile
file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|Kbuild)$ Makefile
include makefile.syntax

file CMakeLists.txt$ CMake
include cmake.syntax

file ..\*\\.(pp|PP|pas|PAS|dpr|DPR|inc|INC)$ Pascal\sProgram
include pascal.syntax

Expand All @@ -85,13 +94,13 @@ include slang.syntax
file ..\*\\.tex$ LaTeX\s2.09\sDocument
include latex.syntax

file ..\*\\.(texi|texinfo|TEXI|TEXINFO)$ Texinfo\sDocument
file ..\*\.(texi|texinfo|TEXI|TEXINFO)$ Texinfo\sDocument
include texinfo.syntax

file ..\*\\.c$ C\sProgram
include c.syntax

file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|hh|hpp|HPP|h\\.in)$ C/C\+\+\sProgram
file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|hh|hpp|HPP|h\.in)$ C/C\+\+\sProgram
include cxx.syntax

file ..\*\\.d$ D\sProgram
Expand All @@ -115,7 +124,7 @@ include j.syntax
file ..\*\\.(java|JAVA|Java|jav|groovy|GROOVY|Groovy)$ Java\sProgram
include java.syntax

file ..\*\\.(properties|config)$ Java\sFile
file ..\*\\.(properties|config) Java\sFile
include properties.syntax

file ..\*\\.(cs|CS)$ C\#\sProgram
Expand All @@ -124,6 +133,9 @@ include cs.syntax
file ..\*\\.(js|JS)$ JavaScript\sProgram
include js.syntax

file ..\*\\.(coffee|Coffee|COFFEE)$ JavaScript\sProgram
include coffee.syntax

file ..\*\\.(as|AS)$ ActionScript\sProgram
include as.syntax

Expand All @@ -145,7 +157,7 @@ include octave.syntax
file ..\*\\.(sql|SQL)$ SQL\sProgram
include sql.syntax

file ..\*\\.(spec|spec\\.in)$ RPM\sSpecfile
file ..\*\\.(spec|spec\.in)$ RPM\sSpecfile
include spec.syntax

file ..\*\\.repo$ YUM\sRepo\sFile
Expand All @@ -154,7 +166,7 @@ include yum-repo.syntax
file ..\*\\.(awk)$ AWK\sFile
include awk.syntax

file ..\*\\.(css|qss|CSS|QSS)$ CSS\sFile
file ..\*\\.(scss|css|qss|CSS|QSS|scss\.erb|css\.erb)$ CSS\sFile
include css.syntax

file .\*ChangeLog[\\\.A-Za-z0-9_]\*$ GNU\sChangeLog\sFile
Expand Down Expand Up @@ -190,7 +202,7 @@ include ini.syntax
file Don_t_match_me Mail\sfolder ^(From|Return-(P|p)ath:|From:|Date:)\s
include mail.syntax

file \\.procmailrc$ Procmail\sRC\sFile ^#/usr/bin/procmail
file \.procmailrc$ Procmail\sRC\sFile ^#/usr/bin/procmail
include procmail.syntax

file sources.list$ sources\slist
Expand Down Expand Up @@ -247,14 +259,5 @@ include sh.syntax
file ..\*\\.(l|y|yxx|ypp)$ Lex/Flex/Yacc/Bison\ssource
include yxx.syntax

file ..\*\\.dlink\\.sw$ D-Link\sSwitch\sCommands
include dlink.syntax

file ..\*\\.([jJ][aA][lL][tT]?)$ Jal\ssource
include jal.syntax

file ..\*\\.([lL][kK][rR])$ PIC\slinker\sscript\sfile
include lkr.syntax

file .\* unknown
include unknown.syntax
159 changes: 159 additions & 0 deletions misc/syntax/coffee.syntax
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
# CoffeScript syntax highlighting
# for mcedit
# Autor r72cccp
# 2014
# based on javascipt file from Vlad Romanenko and ruby file from Marco Ciampa:
# ===================================================================================
# JavaScript syntax highlighting
# for MC Editor/CoolEdit
#
# Author: Vlad Romanenko <[email protected]>
# Based on c.syntax
# ===================================================================================
# Ruby syntax file derived from perl syntax by Marco Ciampa <[email protected]>
# alpha version 0.2 16/05/2003


context default

#=========================
# Keywords
keyword whole arguments magenta
keyword whole break magenta
keyword whole caller magenta
keyword whole case magenta
keyword whole catch magenta
keyword whole constructor magenta
keyword whole continue magenta
keyword whole else magenta
keyword whole default magenta
keyword whole delete magenta
keyword whole for magenta
keyword whole function magenta
keyword whole if magenta
keyword whole then magenta
keyword whole in magenta
keyword whole instanceof magenta
keyword whole new magenta
keyword whole of magenta
keyword whole prototype magenta
keyword whole return magenta
keyword whole switch magenta
keyword whole this magenta
keyword whole throw magenta
keyword whole try magenta
keyword whole typeof magenta
keyword whole unless magenta
keyword whole var magenta
keyword whole while magenta
keyword whole with magenta

#=========================
# Objects
keyword whole ActiveXObject yellow
keyword whole Array yellow
keyword whole Boolean yellow
keyword whole Date yellow
keyword whole Dictionary yellow
keyword whole Enumerator yellow
keyword whole FileSystemObject yellow
keyword whole Function yellow
keyword whole Global yellow
keyword whole Image yellow
keyword whole Math yellow
keyword whole Number yellow
keyword whole Object yellow
keyword whole TextStream yellow
keyword whole RegExp yellow
keyword whole VBArray yellow

#=========================
# Most common functions
keyword whole alert red
keyword whole escape red
keyword whole eval red
keyword whole indexOf red
keyword whole isNaN red
keyword whole toString red
keyword whole unescape red
keyword whole valueOf red

#=========================
# Constants
keyword whole false brightgreen
keyword whole null brightgreen
keyword whole true brightgreen
keyword whole undefined red

#=========================
# Numbers
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.

keyword whole 0\{xX\}\{0123456789abcdefABCDEF\}\[0123456789abcdefABCDEF\] brightgreen
keyword whole \{0123456789\}\[0123456789\] brightgreen
keyword whole \[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen
keyword whole \{0123456789\}\[0123456789\]\.\[0123456789\] brightgreen
keyword whole \{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
keyword whole \{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
keyword whole \{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen

#=========================
# Special symbols
keyword \. yellow
keyword \* yellow
keyword \+ yellow
keyword - yellow
keyword / yellow
keyword % yellow
keyword whole = yellow
keyword ! yellow
keyword & yellow
keyword | yellow
keyword ^ yellow
keyword ~ yellow
keyword > yellow
keyword < yellow

#=========================
# Separators
keyword { brightcyan
keyword } brightcyan
keyword ( brightcyan
keyword ) brightcyan
keyword [ brightcyan
keyword ] brightcyan
keyword , brightcyan
keyword ? brightcyan
keyword : brightcyan
keyword ; brightmagenta


#=========================
# Comments
context ### ### brown
spellcheck

context # \n brown
spellcheck

#=============================
# Strings

context " " green
spellcheck
keyword \\\{\\'"abtnvfr\} brightgreen
keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen

keyword ' brightgreen

context ' ' green
spellcheck
keyword \\\{\\'"abtnvfr\} brightgreen
keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen

keyword " brightgreen


#================================
# BSA
Loading