nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

objc.nanorc (1540B)


      1 ## Syntax highlighting for C/C++/Obj-C files.
      2 
      3 ## Original author:  Dave Geering
      4 
      5 syntax m "\.m$"
      6 magic "Objective-C source"
      7 comment "//"
      8 
      9 # Stuffs.
     10 color brightwhite "\<[[:upper:]_][[:upper:][:digit:]_]+\>"
     11 color green "\<(float|double|BOOL|bool|char|int|short|long|id|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>"
     12 color green "\<[[:alpha:]_][[:alnum:]_]*_t\>"
     13 color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>"
     14 color brightgreen "\<(for|if|while|do|else|case|default|switch)\>"
     15 color brightgreen "\<(try|throw|catch|operator|new|delete)\>"
     16 color brightgreen "\<(goto|continue|break|return)\>"
     17 color brightgreen "@(encode|end|implementation|interface)|selector)\>"
     18 
     19 # GCC builtins.
     20 color cyan "__attribute__[[:blank:]]*\(\([^)]*\)\)|__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__"
     21 
     22 # Selector/method.
     23 color brightmagenta "(^|[[:blank:]])\[.*[[:blank:]].*\]"
     24 color white ":[[:alnum:]]*"
     25 color magenta "[[:alnum:]]*:"
     26 color white "\[[^][:blank:]]*\]"
     27 
     28 # Strings.
     29 color brightblack "'([^'\]|\\(["'\abfnrtv]|x[[:xdigit:]]{1,2}|[0-3]?[0-7]{1,2}))'"
     30 color brightblack "<[^= 	]*>|"([^"\]|\\.)*""
     31 color brightblue "@"([^"\]|\\.)*""
     32 
     33 # Preprocessor commands.
     34 color brightblue "^[[:blank:]]*#[[:blank:]]*(define|include|import|(un|ifn?)def|endif|el(if|se)|if|warning|error)"
     35 
     36 # Comments.
     37 color yellow "//.*"
     38 color yellow start="/\*" end="\*/"
     39 
     40 # Trailing whitespace.
     41 color ,green "[[:space:]]+$"