From: Dale Weiler Date: Tue, 16 Apr 2013 20:24:33 +0000 (+0000) Subject: Added syntax highlighting configuration files (with documentation on how to install... X-Git-Tag: before-library~54 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a61c9c6d89ddac7a97bd21ba9d42add41959801a;p=xonotic%2Fgmqcc.git Added syntax highlighting configuration files (with documentation on how to install them) for nano, kate and geany. --- diff --git a/syntax/README b/syntax/README new file mode 100644 index 0000000..8b386d8 --- /dev/null +++ b/syntax/README @@ -0,0 +1,18 @@ +Here exists some syntax highlighting configuration files for various +text editors. Inside each directory exists some documentaiton on how +you can install the configuration file correctly. + +Currently the supported text editors: + geany - GTK text editor (not gedit) + kate - KDE text editor (the default text editor that comes with KDE) + nano - base text editor (comes with every base distribution of linux) + + +Other text editors we plan to provide syntax highlighting configuration +files for (but never got around to figuring out) + vim + emacs + gedit + +If your text editor is not supported and you'd like to create syntax +highlighting support for it, don't hesitate to share it with us. diff --git a/syntax/geany/README b/syntax/geany/README new file mode 100644 index 0000000..c527d3f --- /dev/null +++ b/syntax/geany/README @@ -0,0 +1,8 @@ +To use the geany syntax highlighting install filetypes.qc to the syntax +directory for geany. + +# Can be installed globally to +/usr/share/geany/ + +# Can be installed locally to +~/.config/geany/filedefs/ diff --git a/syntax/geany/filetypes.qc b/syntax/geany/filetypes.qc new file mode 100644 index 0000000..d84bb7e --- /dev/null +++ b/syntax/geany/filetypes.qc @@ -0,0 +1,55 @@ +[styling] +default=default +comment=comment +commentline=comment_line +commentdoc=comment_doc +preprocessorcomment=comment +number=number_1 +word=keyword_1 +word2=keyword_2 +string=string_1 +stringraw=string_2 +character=character +uuid=other +preprocessor=preprocessor +operator=operator +identifier=identifier_1 +stringeol=string_eol +verbatim=string_2 +regex=regex +commentlinedoc=comment_line_doc +commentdockeyword=comment_doc_keyword +commentdockeyworderror=comment_doc_keyword_error +globalclass=class +tripleverbatim=string_2 +hashquotedstring=string_2 + +[keywords] +primary=break case const continue string default do else enum float for goto if return switch typedef void while false nil true +secondary= +docComment= + +[lexer_properties] +styling.within.preprocessor=1 +lexer.cpp.track.preprocessor=0 +preprocessor.symbol.$(file.patterns.cpp)=# +preprocessor.start.$(file.patterns.cpp)=if ifdef ifndef +preprocessor.middle.$(file.patterns.cpp)=else elif +preprocessor.end.$(file.patterns.cpp)=endif + +[settings] +extension=qc +comment_single=// +comment_open=/* +comment_close=*/ +comment_use_indent=true +context_action_cmd= + +[indentation] +width=4 +type=0 + +[build_settings] +compiler=gmqcc -Wall "%f" -o "%e" +linker= +run_cmd=qcvm "./%e" diff --git a/syntax/kate/README b/syntax/kate/README new file mode 100644 index 0000000..08201ae --- /dev/null +++ b/syntax/kate/README @@ -0,0 +1,9 @@ +To use the Kate syntax highlighting install qc.xml to the syntax +directory for geany. + +# Can be installed globally to +$KDEDIR/share/apps/katepart/syntax + +if $KDEDIR is unset you can lookup the folder directory with +ke4-config --prefix if that doesn't work chances are KDEDIR is +/usr diff --git a/syntax/kate/qc.xml b/syntax/kate/qc.xml new file mode 100644 index 0000000..2f49dba --- /dev/null +++ b/syntax/kate/qc.xml @@ -0,0 +1,155 @@ + + + + + + break + case + continue + default + do + else + enum + for + goto + if + return + switch + typedef + while + nil + + + const + vector + float + void + string + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/syntax/nano/README b/syntax/nano/README new file mode 100644 index 0000000..edd9d3f --- /dev/null +++ b/syntax/nano/README @@ -0,0 +1,12 @@ +To use the nano syntax highlighting install qc.nanorc somewhere and +add: + +include /directory/qc.nanorc + +to your nanorc file located at ~/.nanorc. If the file doesn't exist +create it. + +Optionally you can install it globally by installing qc.nanorc to +/usr/share/nano + +However you still need to provide the include to your ~/.nanorc diff --git a/syntax/nano/qc.nanorc b/syntax/nano/qc.nanorc new file mode 100644 index 0000000..5222485 --- /dev/null +++ b/syntax/nano/qc.nanorc @@ -0,0 +1,22 @@ +# Language: QuakeC +# Maintainer: Dale Weiler + +syntax "qc" "\.(qc|QC)$" "\.(qh|QH)$" +color brightred "\<[A-Z_][0-9A-Z_]+\>" +color green "\<(float|string|enum|void|const|typedef|nil)\>" +color brightyellow "\<(for|if|while|do|else|case|default|switch)\>" +color magenta "\<(goto|continue|break|return)\>" +color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error|pragma)" +color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" + +color brightyellow "<[^= ]*>" ""(\\.|[^"])*"" + +## This string is VERY resource intensive! +color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" + +## Comment highlighting +color brightblue "//.*" +color brightblue start="/\*" end="\*/" + +## Trailing whitespace +color ,green "[[:space:]]+$"