syntax "default" color green "^#.*" color brightgreen "^##.*" color yellow "^###.*" #color green "^[ \t]*#.*
Tag: Syntax
Syntax Highlighting with nano – nanorc for debian
## syntax highlighting for /etc/apt/sources.list syntax "apt/sources.list" "sources\.list(\.old|~)?$" # component color brightmagenta "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+ .+$" # distribution color brightred "^deb(-src)? ((http|file|ftp):/[^ ]+|cdrom:\[[^\]]+\]/|cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/) [^ ]+" # URI color brightgreen "(http|file|ftp):/[^ ]+" # cdroms # [^\]] does not work… color brightgreen "cdrom:\[[a-zA-Z0-9\._-\(\) ]+\]/" # deb / deb-src color cyan "^deb" color brightblue "^deb-src" # comments color brightyellow "#.*"
Syntax Highlighting with nano – nanorc for css
############################################################################## # # Syntax highlighting for CSS files # # Author: Simon Rupf, simon.rupf(a)int-ag.ch # License: GPL 2 or later # # Version: 2005-02-14 # ############################################################################## syntax "css" "\.css$" color brightred "." color brightyellow start="\{" end="\}" color brightwhite start=":" end="[;^\{]" color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before|$" color brightblue start="\/\*" end="\\*/" color green ";|:|\{|\}"
Syntax Highlighting with nano – nanorc for conky
## Conky config highlighting ## syntax "Conky" ".conkyrc$" color brightblue "(use_spacer|background|use_xft|xftfont|xftalpha)" color brightblue "(mail_spool|update_interval|own_window)" color brightblue "(double_buffer|minimum_size)" color brightblue "(draw_(outline|borders|shades)|stippled_borders)" color brightblue "border_(margin|width)" color brightblue "default_((shade_|outline_)?color)" color brightblue "(alignment|gap_x|gap_y|no_buffers|uppercase)" color brightblue "^TEXT[[:space:]]*$" color brightred "[[:space:]]+(yes|no)[[:space:]]*" color brightred "(top_left|top_right|bottom_left|bottom_right)[[:space:]]*$" color magenta "[[:space:]]+([[:space:]]*([0-9]\.?))+[[:space:]]*" color brightred "\$\{?[a-zA-Z_0-9\# ]+\}?" color green "^[[:space:]]*#.*" color white "[[:space:]]+\#[0-9A-Fa-f]{6}"
Syntax Highlighting with nano – nanorc for configfiles
### all *conf files (e.g. make.conf, xorg.conf, grub.conf, make.globals, Xfce files...) syntax "configfiles" "(\.|/|)conf$" "(\.|/|)ample$" "(\.|/|)globals$" "xfce.*$" "syslog-ng" "sudoers" color brightwhite "\<(alias)\>" color blue "<(\\.|[^'])*>" color magenta "[a-zA-Z0-9\_]+=" color white ">(\\.|[^'><])*</" color green "//.*$" color red ""(\\.|[^\"])*"" color red "title.*$" "\<(server)\>" "\<(logfile)\>" "\<(driftfile)\>" "\<(restrict)\>" color white ":unscaled" "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/" color magenta "'(\\.|[^'])*'" color brightwhite "[0-9]" color brightwhite "[<>]" color magenta "Section" "EndSection" "SubSection" "EndSubSection" color red "\<(root)\>" color brightred,blue "^.*-->" start="<!--.*" end="$" color green "#.*$" start="<!--" end="-->"
Syntax Highlighting with nano – nanorc for config3
### even more config files ;-) syntax "config3" "iptables" "ntp.*$" "rsyncd" "xfs" "saslauthd" "timidity" "net.*$" "hdparm" "esound" "login.*$" color red "/.*$" "http\:\/\/.*$" ""(\\.|[^\"])*"" "\<(server)\>" "\<(logfile)\>""\<(driftfile)\>" color white ":unscaled" "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/" color blue "setenv|export" color brightwhite "[0-9]" color green "#.*$"
Syntax Highlighting with nano – nanorc for config2
### more config files syntax "config2" "(\.|/|)env$" "(\.|/|)server.$" "hosts" "gpm" "local.*$" "bootsplash" "crypto-loop" color red "/.*$" "http\:\/\/.*$" color white ":unscaled" color blue "setenv|export" color brightwhite "[0-9]" color green "#.*$" color white "http\:\/\/" "ftp\:\/\/" "rsync\:\/\/"
Syntax Highlighting with nano – nanorc for config
### several config files syntax "config" "(\.|/|)config$" "(\.|/|)logout$" "(\.|/|)COLORS$" "(\.|/|)colors$" color red "/.*$" "TERM" "\..*$" "=.*$" "\*.*$" color white ":unscaled" "[0-9]" color blue "setenv|export" "\;" color green "#.*$"
Syntax Highlighting with nano – nanorc for conf
# Generic *.conf file syntax highlighting # syntax "conf" "\.(c(onf|nf|fg))$" # string icolor yellow ""(\\.|[^"])*"" # variable name & value icolor brightyellow start="=" end="$" icolor magenta start="(^|[[:space:]])[0-9a-z-]" end="=" # bracket/parenthesis icolor brightred "(^|[[:space:]])((\[|\()[0-9a-z_!@#$%^&*-]+(\]|\)))" # number color green "[[:space:]][0-9.KM]+" # comment color cyan start="(^|[[:space:]])(#|;).*$" end="$" color brightblue "(^|[[:space:]])(#|;)"
Syntax Highlighting with nano – nanorc for clike
## Here is an example for C/C++. ## syntax "clike" "\.(m|pch)$" color brightred "\<[A-Z_][0-9A-Z_]+\>" color green "\<(float|double|bool|char|int|short|long|sizeof|enum|void|static|const|struct|union|typedef|extern|(un)?signed|inline)\>" color green "\<((s?size)|((u_?)?int(8|16|32|64|ptr)))_t\>" color green "\<(class|namespace|template|public|protected|private|typename|this|friend|virtual|using|mutable|volatile|register|explicit)\>" color brightyellow "\<(for|if|while|do|else|case|default|switch)\>" color brightyellow "\<(try|throw|catch|operator|new|delete)\>" color magenta "\<(goto|continue|break|return)\>" color brightcyan "^[[:space:]]*#[[:space:]]*(define|include|(un|ifn?)def|endif|el(if|se)|if|warning|error)" color brightmagenta "'([^'\]|(\\["'abfnrtv\\]))'" "'\\(([0-3]?[0-7]{1,2}))'" "'\\x[0-9A-Fa-f]{1,2}'" ## ## GCC builtins color cyan "__attribute__[[:space:]]*\(\([^)]*\)\)" "__(aligned|asm|builtin|hidden|inline|packed|restrict|section|typeof|weak)__" ## ## 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 brightyellow "<[^= ]*>" ""(\\.|[^"])*"" ## ## This string is VERY resource intensive! color brightyellow start=""(\\.|[^"])*\\[[:space:]]*$" end="^(\\.|[^"])*"" ## Comment highlighting color brightblue "//.*" color brightblue start="/\*" end="\*/"