mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-29 22:27:13 +09:00
Merge
This commit is contained in:
@@ -641,7 +641,12 @@ func (h *BufPane) ShowKeyCmd(args []string) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if action, ok := config.Bindings[args[0]]; ok {
|
event, err := findEvent(args[0])
|
||||||
|
if err != nil {
|
||||||
|
InfoBar.Error(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if action, ok := config.Bindings[event.Name()]; ok {
|
||||||
InfoBar.Message(action)
|
InfoBar.Message(action)
|
||||||
} else {
|
} else {
|
||||||
InfoBar.Message(args[0], " has no binding")
|
InfoBar.Message(args[0], " has no binding")
|
||||||
|
|||||||
@@ -7,15 +7,19 @@ rules:
|
|||||||
# function definition
|
# function definition
|
||||||
- identifier: "fn [a-z0-9_]+"
|
- identifier: "fn [a-z0-9_]+"
|
||||||
# Reserved words
|
# Reserved words
|
||||||
- statement: "\\b(abstract|alignof|as|become|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\\b"
|
- statement: "\\b(abstract|alignof|as|become|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\\b"
|
||||||
# macros
|
# macros
|
||||||
- special: "[a-z_]+!"
|
- special: "[a-z_]+!"
|
||||||
# Constants
|
# Constants
|
||||||
- constant: "[A-Z][A-Z_]+"
|
- constant: "\\b[A-Z][A-Z_0-9]+\\b"
|
||||||
# Numbers
|
# Numbers
|
||||||
- constant.number: "\\b[0-9]+\\b"
|
- constant.number: "\\b[0-9]+\\b"
|
||||||
|
# Booleans
|
||||||
|
- constant: "\\b(true|false)\\b"
|
||||||
# Traits/Enums/Structs/Types/etc.
|
# Traits/Enums/Structs/Types/etc.
|
||||||
- type: "[A-Z][a-z]+"
|
- type: "\\b[A-Z]+[a-zA-Z_0-9]*[a-z]+[a-zA-Z_0-9]*\\b"
|
||||||
|
# Builtin types that start with lowercase.
|
||||||
|
- type: "\\b(bool|str|isize|usize|((i|u)(8|16|32|64))|f32|f64)\\b"
|
||||||
|
|
||||||
- constant.string:
|
- constant.string:
|
||||||
start: "\""
|
start: "\""
|
||||||
|
|||||||
Reference in New Issue
Block a user