From 0f235305791c852bbd8e7e2e21a31464ce88a998 Mon Sep 17 00:00:00 2001 From: Jonas Rosling Date: Mon, 2 Jul 2012 16:47:30 +0200 Subject: [PATCH] nicer erlang syntax highlighting --- erlang.jsf | 58 +++++++++++++++++++++++++++++++++++++++--------------- ftyperc | 26 ++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 16 deletions(-) diff --git a/erlang.jsf b/erlang.jsf index ea4138b..69eb7d6 100644 --- a/erlang.jsf +++ b/erlang.jsf @@ -1,26 +1,32 @@ # JOE syntax highlight file for Erlang =Idle -=Comment green -=Constant cyan -=Escape bold cyan +=Comment fg_030 +=String fg_110 +=Int fg_033 +=Record fg_530 +=Recatt fg_530 +=Fun fg_115 +=Module fg_101 =Keyword bold -=Bad bold red -=Brace magenta +=Brace fg_555 bold +=Brack fg_222 =Variable fg_310 -=Attribute magenta +=Attribute fg_505 :idle Idle * idle - "A-Z" variable noeat + "A-Z_" variable noeat "%" line_comment noeat "\"" string recolor=-1 "'" quoted_atom recolor=-1 "0-9" decimal recolor=-1 - "{[]}" brace recolor=-1 + "[]" brack recolor=-1 + "{}" brace recolor=-1 "-" maybe_attribute mark - "a-z" atom buffer + "a-z" atom buffer mark noeat + "#" record recolor=-1 :line_comment Comment * line_comment @@ -28,28 +34,40 @@ :variable Variable * idle noeat - "a-zA-Z" variable + "a-zA-Z0-9_" variable -:string Constant +:record Record + * idle noeat + "a-zA-z_" record + "." recatt recolor=-1 + +:recatt Recatt + * idle noeat + "a-zA-Z_" recatt + +:string String * string "\"" idle -:decimal Constant +:decimal Int * idle noeat "0-9" decimal "." float -:float Constant +:float Int * idle noeat "0-9" float :brace Brace * idle noeat +:brack Brack + * idle noeat + :maybe_attribute Idle * idle noeat - "a-z" maybe_attribute - "(" attribute recolormark + "a-z_" maybe_attribute + "(." attribute recolormark noeat :attribute Attribute * idle noeat @@ -84,9 +102,17 @@ "try" kw "when" kw "xor" kw -done +done + "(" function recolormark noeat + ":" module recolormark noeat "a-zA-Z0-9_@" atom +:module Module + * idle noeat + +:function Fun + * idle noeat + :kw Keyword * idle noeat diff --git a/ftyperc b/ftyperc index 358051e..b112f80 100644 --- a/ftyperc +++ b/ftyperc @@ -895,6 +895,32 @@ *.erl -syntax erlang -autoindent +-tab 4 + +*.eterm +-syntax erlang +-autoindent +-tab 4 + +*.app.src +-syntax erlang +-autoindent +-tab 4 + +*rebar.config +-syntax erlang +-autoindent +-tab 4 + +*.hrl +-syntax erlang +-autoindent +-tab 4 + +*.erlang +-syntax erlang +-autoindent +-tab 4 Sieve (ManageSieve) *.sieve