Make zenburn the default colorscheme

This commit also adds better support for constant.number in the
syntax files.
This commit is contained in:
Zachary Yedidia 2016-08-27 17:10:26 -04:00
parent e0074c881c
commit 2de42bcf99
14 changed files with 43 additions and 35 deletions

File diff suppressed because one or more lines are too long

View file

@ -150,12 +150,12 @@ func GetOption(name string) interface{} {
return GetGlobalOption(name)
}
// DefaultSettings returns the default settings for micro
// DefaultGlobalSettings returns the default global settings for micro
// Note that colorscheme is a global only option
func DefaultGlobalSettings() map[string]interface{} {
return map[string]interface{}{
"autoindent": true,
"colorscheme": "monokai",
"colorscheme": "zenburn",
"cursorline": false,
"ignorecase": false,
"indentchar": " ",

View file

@ -14,6 +14,7 @@ color-link todo "bold 254,237"
color-link statusline "186,236"
color-link indent-char "238,237"
color-link line-number "188,238"
color-link gutter-error "115,236"
color-link gutter-error "237,174"
color-link gutter-warning "174,237"
color-link cursor-line "238"
color-link current-line-number "188,237"

View file

@ -21,6 +21,7 @@ color statement "[.:;,+*|=!\%]" "<" ">" "/" "-" "&"
#Parenthetical Color
# color magenta "[(){}]" "\[" "\]"
color constant.number "\b[0-9]+\b"
##
## String highlighting. You will in general want your brightblacks and

View file

@ -13,27 +13,27 @@ color statement "\.\.(\.)?|!|\*|&|~|\(|\)|\[|\]|\\|/|\+|-|%|<|>|\?|:|;"
color error "(0[0-7_]*)(L[uU]?|[uU]L?)?"
## Decimal integer literals
color constant "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?"
color constant.number "([0-9]|[1-9][0-9_]*)(L[uU]?|[uU]L?)?"
## Binary integer literals
color constant "(0[bB][01_]*)(L[uU]?|[uU]L?)?"
## Decimal float literals
color constant "[0-9][0-9_]*\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
color constant "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
color constant "[^.]\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
color constant "[0-9][0-9_]*([fFL]?i|[fF])"
color constant.number "[0-9][0-9_]*\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
color constant.number "[0-9][0-9_]*([eE][+-]?([0-9][0-9_]*))[fFL]?i?"
color constant.number "[^.]\.([0-9][0-9_]*)([eE][+-]?([0-9][0-9_]*))?[fFL]?i?"
color constant.number "[0-9][0-9_]*([fFL]?i|[fF])"
## Hexadecimal integer literals
color constant "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
color constant.number "(0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F]))(L[uU]?|[uU]L?)?"
## Hexadecimal float literals
color constant "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
color constant "0[xX]\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
color constant.number "0[xX]([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])(\.[0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])?[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
color constant.number "0[xX]\.([0-9a-fA-F][0-9a-fA-F_]*|[0-9a-fA-F_]*[0-9a-fA-F])[pP][+-]?([0-9][0-9_]*)[fFL]?i?"
## Character literals
color constant "'([^\']|\\(['"?\abfnrtv]|x[[:xdigit:]]{2}|[0-7]{1,3}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8}|&.*;))'"
color constant.string "'([^\']|\\(['"?\abfnrtv]|x[[:xdigit:]]{2}|[0-7]{1,3}|u[[:xdigit:]]{4}|U[[:xdigit:]]{8}|&.*;))'"
## Keywords
## a-e

View file

@ -6,6 +6,7 @@ color statement "\b(break|case|catch|continue|default|do|else|finally|for|if|ret
color type "\b(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\b"
color constant.string ""[^"]*""
color constant "\b(true|false|null)\b"
color constant.number "\b[0-9]+\b"
color comment "//.*"
color comment start="/\*" end="\*/"
color comment start="/\*\*" end="\*/"

View file

@ -1,9 +1,9 @@
syntax "javascript" "\.js$"
color blue "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color blue "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color blue "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color brightblue "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color constant.number "\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\b"
color constant.number "\b[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color constant.number "\b[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
color identifier "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[(]"
color statement "\b(break|case|catch|continue|default|delete|do|else|finally)\b"
color statement "\b(for|function|get|if|in|instanceof|new|return|set|switch)\b"
color statement "\b(switch|this|throw|try|typeof|var|void|while|with)\b"

View file

@ -46,7 +46,7 @@ color constant "\b(false|nil|true)\b"
color statement "(\b(dofile|require|include)|%q|%!|%Q|%r|%x)\b"
# Numbers
color constant "\b([0-9]+)\b"
color constant.number "\b([0-9]+)\b"
# Symbols
color statement "(\(|\)|\[|\]|\{|\})"

View file

@ -30,7 +30,7 @@ color statement "[.:;,+*|=!\%@]" "<" ">" "/" "-" "&"
color statement "[(){}]" "\[" "\]"
## numbers
color constant "\b[0-9]+\b"
color constant.number "\b[0-9]+\b"
## strings
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"

View file

@ -7,6 +7,7 @@ header "^#!.*/(env +)?ruby( |$)"
color statement "\b(BEGIN|END|alias|and|begin|break|case|class|def|defined\?|do|else|elsif|end|ensure|false|for|if|in|module|next|nil|not|or|redo|rescue|retry|return|self|super|then|true|undef|unless|until|when|while|yield)\b"
## Constants
color constant "(\$|@|@@)?\b[A-Z]+[0-9A-Z_a-z]*"
color constant.number "\b[0-9]+\b"
## Ruby "symbols"
color constant (i) "([ ]|^):[0-9A-Z_]+\b"
## Some unique things we want to stand out
@ -15,14 +16,14 @@ color constant "\b(__FILE__|__LINE__)\b"
color constant "/([^/]|(\\/))*/[iomx]*" "%r\{([^}]|(\\}))*\}[iomx]*"
## Shell command expansion is in `backticks` or like %x{this}. These are
## "double-quotish" (to use a perlism).
color constant "`[^`]*`" "%x\{[^}]*\}"
color constant.string "`[^`]*`" "%x\{[^}]*\}"
## Strings, double-quoted
color constant ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
color constant.string ""([^"]|(\\"))*"" "%[QW]?\{[^}]*\}" "%[QW]?\([^)]*\)" "%[QW]?<[^>]*>" "%[QW]?\[[^]]*\]" "%[QW]?\$[^$]*\$" "%[QW]?\^[^^]*\^" "%[QW]?![^!]*!"
## Expression substitution. These go inside double-quoted strings,
## "like #{this}".
color special "#\{[^}]*\}"
## Strings, single-quoted
color constant "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
color constant.string "'([^']|(\\'))*'" "%[qw]\{[^}]*\}" "%[qw]\([^)]*\)" "%[qw]<[^>]*>" "%[qw]\[[^]]*\]" "%[qw]\$[^$]*\$" "%[qw]\^[^^]*\^" "%[qw]![^!]*!"
## Comments
color comment "#[^{].*$" "#$"
color comment "##[^{].*$" "##$"

View file

@ -16,6 +16,9 @@ color special "[a-z_]+!"
# Constants
color constant "[A-Z][A-Z_]+"
# Numbers
color constant.number "\b[0-9]+\b"
# Traits/Enums/Structs/Types/etc.
color type "[A-Z][a-z]+"

View file

@ -2,7 +2,7 @@ syntax "shell" "\.sh$" "\.bash" "\.bashrc" "bashrc" "\.bash_aliases" "bash_alias
header "^#!.*/(env +)?(ba)?sh( |$)"
# Numbers
color constant "\b[0-9]+\b"
color constant.number "\b[0-9]+\b"
# Conditionals and control flow
color statement "\b(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\b"

View file

@ -16,7 +16,7 @@ color statement "(print)"
color statement "(init)"
# Numbers
color constant "([0-9]+)"
color constant.number "([0-9]+)"
# Standard Types
color type "\ ((U)?Int(8|16|32|64))"

View file

@ -5,4 +5,5 @@ color statement "\b([nvxsoilc]?(nore|un)?map|[nvlx]n|[ico]?no|[cilovx][um]|s?un
color statement "\b(snor|nun|nm|set|if|endif|let|unlet)\b"
color statement "[!&=]"
color constant.string ""(\\.|[^"])*"|'(\\.|[^'])*'"
color constant.number "\b[0-9]+\b"
color comment "(^|[[:space:]])\"[^"]*$"