2008-09-30 <bluestorm_dylc@hotmail.com>
* ocaml.nanorc: Sample OCaml syntax highlighting file 2008-09-30 Dave Geering <dgeering@toshiba-tap.com> * objc.nanorc: Sample Objective-C Syntax Hightlighting file git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4332 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
83c3f951f6
commit
215eb3645e
|
@ -1,14 +1,23 @@
|
|||
2008-09-30 <bluestorm_dylc@hotmail.com>
|
||||
* ocaml.nanorc: Sample OCaml syntax highlighting file
|
||||
|
||||
2008-09-30 Dave Geering <dgeering@toshiba-tap.com>
|
||||
* objc.nanorc: Sample Objective-C Syntax Hightlighting file
|
||||
|
||||
2008-09-30 Chris Allegretta <chrisa@asty.org>
|
||||
* configure.ac: Change extra, multibuffer, color and rcfile configure options to default to enabled
|
||||
--enable-tiny will now disable these options as well
|
||||
* python.nanorc, ruby.nanorc: Add header lines for python and ruby as well
|
||||
|
||||
2008-09-21 Chris Allegretta <chrisa@asty.org>
|
||||
* rcfile.c, color.c, nano.h: Add new capability for matching a syntax type by the "header" (1st line)
|
||||
of a file being edited. Based on Savannah bug 24197 and inital proof of concept by Dave Geering
|
||||
<dgeering@toshiba-tap.com>
|
||||
|
||||
2008-09-16 Chris Allegretta <chrisa@asty.org>
|
||||
* text.c: Add support for undoing a text uncut. Split out the undo and redo of a text cut
|
||||
in order to avoid code duplication.
|
||||
|
||||
2008-09-06 Chris Allegretta <chrisa@asty.org>
|
||||
* nano.c: Do call disable_signals at startup regardless, since under cygwin we can't generate
|
||||
^C without it.
|
||||
|
|
|
@ -19,6 +19,8 @@ pkgdata_DATA = asm.nanorc \
|
|||
debian.nanorc \
|
||||
awk.nanorc \
|
||||
css.nanorc \
|
||||
xml.nanorc
|
||||
xml.nanorc \
|
||||
ocaml.nanorc \
|
||||
objc.nanorc
|
||||
|
||||
EXTRA_DIST = $(pkgdata_DATA)
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
## Here is an example for C/C++/Obj-C.
|
||||
##
|
||||
syntax "m" "\.m$"
|
||||
|
||||
|
||||
## Stuffs
|
||||
color brightwhite "\<[A-Z_][0-9A-Z_]+\>"
|
||||
color green "\<(float|double|BOOL|bool|char|int|short|long|id|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
|
||||
color green "\<[[:alpha:]_][[:alnum:]_]*_t\>"
|
||||
color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
|
||||
color brightgreen "\<(for|if|while|do|else|case|default|switch)\>"
|
||||
color brightgreen "\<(try|throw|catch|operator|new|delete)\>"
|
||||
color brightgreen "\<(goto|continue|break|return)\>"
|
||||
color brightgreen "@\<(en(code|d)|i(mplementation|nterface)|selector)\>"
|
||||
##
|
||||
## GCC builtins
|
||||
color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
|
||||
|
||||
## Selector/method
|
||||
color brightmagenta "(^|[[:space:]])\[.*[[:space:]].*\]"
|
||||
color white ":[[:alnum:]]*"
|
||||
color magenta "[[:alnum:]]*:"
|
||||
color white "\[[^][:space:]]*\]"
|
||||
|
||||
##
|
||||
## String highlighting. You will in general want your comments and
|
||||
## strings to come last, because syntax highlighting rules will be
|
||||
## applied in the order they are read in.
|
||||
color brightblack "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'"
|
||||
color brightblack "<[^= ]*>" ""(\\.|[^"])*""
|
||||
color brightblue "@"(\\.|[^"])*""
|
||||
##
|
||||
## This string is VERY resource intensive!
|
||||
## color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*""
|
||||
|
||||
color brightblue "^[[:space:]]*#[[:space:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
|
||||
|
||||
## Comment highlighting
|
||||
color yellow "//.*"
|
||||
color yellow start="/\*" end="\*/"
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
# OCaml sample nanorc
|
||||
#
|
||||
syntax "ocaml" "\.mli?$"
|
||||
#uid
|
||||
color red "\<[A-Z][0-9a-z_]{2,}\>"
|
||||
#declarations
|
||||
color green "\<(let|val|method|in|and|rec|private|virtual|constraint)\>"
|
||||
#structure items
|
||||
color red "\<(type|open|class|module|exception|external)\>"
|
||||
#patterns
|
||||
color blue "\<(fun|function|functor|match|try|with)\>"
|
||||
#patterns-modifiers
|
||||
color yellow "\<(as|when|of)\>"
|
||||
#conditions
|
||||
color cyan "\<(if|then|else)\>"
|
||||
#blocs
|
||||
color magenta "\<(begin|end|object|struct|sig|for|while|do|done|to|downto)\>"
|
||||
#constantes
|
||||
color green "\<(true|false)\>"
|
||||
#modules/classes
|
||||
color green "\<(include|inherit|initializer)\>"
|
||||
#expr modifiers
|
||||
color yellow "\<(new|ref|mutable|lazy|assert|raise)\>"
|
||||
#comments
|
||||
color white start="\(\*" end="\*\)"
|
||||
#strings (no multiline handling yet)
|
||||
color brightblack ""[^\"]*""
|
Loading…
Reference in New Issue