{ "name": "Readline Init File", "scopeName": "source.inputrc", "patterns": [ { "include": "#main" } ], "repository": { "comment": { "name": "comment.line.number-sign.ini.inputrc", "begin": "#", "end": "$", "beginCaptures": { "0": { "name": "punctuation.definition.comment.ini.inputrc" } } }, "conditional": { "patterns": [ { "name": "meta.conditional.inputrc", "begin": "(?i)^\\s*((\\$)if)(?=\\s|$)(.*)", "end": "(?i)^\\s*((\\$)endif)(?=\\s|$)", "patterns": [ { "include": "#main" } ], "beginCaptures": { "1": { "name": "keyword.control.flow.if.inputrc" }, "2": { "name": "punctuation.definition.directive.inputrc" }, "3": { "patterns": [ { "include": "#conditions" } ] } }, "endCaptures": { "1": { "name": "keyword.control.flow.endif.inputrc" }, "2": { "name": "punctuation.definition.directive.inputrc" } } }, { "match": "(?i)^\\s*((\\$)(else|endif))(?=\\s|$)", "beginCaptures": { "1": { "name": "keyword.control.flow.$3.inputrc" }, "2": { "name": "punctuation.definition.directive.inputrc" } } } ] }, "conditions": { "patterns": [ { "match": "(?i)(?:^|\\G)\\s*(mode)\\s*(==|=|!=)\\s*(?:(emacs|vi)(?=\\s|$))?", "captures": { "1": { "name": "variable.parameter.condition.mode.inputrc" }, "2": { "name": "keyword.operator.comparison.inputrc" }, "3": { "name": "constant.language.editing-mode.inputrc" } } }, { "match": "(?i)(?:^|\\G)\\s*(term)\\s*(==|=|!=)\\s*(\\S.*?)\\s*$", "captures": { "1": { "name": "variable.parameter.condition.term.inputrc" }, "2": { "name": "keyword.operator.comparison.inputrc" }, "3": { "name": "constant.language.terminal-type.inputrc" } } }, { "match": "(?i)(?:^|\\G)\\s*(version)\\s*(==|=|!=|\u003c=|\u003e=|\u003c|\u003e)\\s*(?:([-+]?[.\\d]+))?", "captures": { "1": { "name": "variable.parameter.condition.version.inputrc" }, "2": { "name": "keyword.operator.comparison.inputrc" }, "3": { "patterns": [ { "include": "etc#num" } ] } } }, { "match": "(?i)(?:^|\\G)\\s*([^\\s!=#]+)\\s*(==|=|!=)\\s*(?:(on|off)(?=\\s|$)|(\\S.*))?", "captures": { "1": { "name": "variable.parameter.condition.named.inputrc" }, "2": { "name": "keyword.operator.comparison.inputrc" }, "3": { "name": "constant.logical.bool.boolean.${3:/downcase}.inputrc" }, "4": { "name": "string.unquoted.inputrc" } } }, { "match": "(?i)(?:^|\\G)\\s*([^\\s!=#]+)\\s*$", "captures": { "1": { "name": "variable.parameter.condition.application.inputrc" } } } ] }, "escapes": { "patterns": [ { "name": "constant.character.escape.alert.inputrc", "match": "\\\\a" }, { "name": "constant.character.escape.backspace.inputrc", "match": "\\\\b" }, { "name": "constant.character.escape.delete.inputrc", "match": "\\\\d" }, { "name": "constant.character.escape.form-feed.inputrc", "match": "\\\\f" }, { "name": "constant.character.escape.newline.inputrc", "match": "\\\\n" }, { "name": "constant.character.escape.carriage-return.inputrc", "match": "\\\\r" }, { "name": "constant.character.escape.horizontal-tab.inputrc", "match": "\\\\t" }, { "name": "constant.character.escape.vertical-tab.inputrc", "match": "\\\\v" }, { "name": "constant.character.escape.control-prefix.inputrc", "match": "\\\\C" }, { "name": "constant.character.escape.meta-prefix.inputrc", "match": "\\\\M" }, { "name": "constant.character.escape.literal.inputrc", "match": "\\\\e" }, { "name": "constant.character.escape.backslash.inputrc", "match": "\\{2}" }, { "name": "constant.character.escape.quote.double.inputrc", "match": "\\\\\"" }, { "name": "constant.character.escape.quote.single.inputrc", "match": "\\\\'" }, { "name": "constant.character.escape.codepoint.octal.inputrc", "match": "\\\\[0-7]{1,3}" }, { "name": "constant.character.escape.codepoint.hex.inputrc", "match": "\\\\x[a-fA-F0-9]{1,2}" } ] }, "include": { "name": "meta.include.inputrc", "contentName": "string.unquoted.file.path.inputrc", "begin": "^\\s*((\\$)include)(?=\\s|$)", "end": "$", "patterns": [ { "include": "#escapes" } ], "beginCaptures": { "1": { "name": "keyword.control.directive.include.inputrc" }, "2": { "name": "punctuation.definition.directive.inputrc" } } }, "keyBinding": { "name": "meta.key-binding.inputrc", "begin": "(?i)^\\s*(?!set(?:\\s|$)|\\$)(?=[^\\s#])", "end": "$", "patterns": [ { "include": "#keyName" }, { "begin": ":[ \\t]*", "end": "(?=$)", "patterns": [ { "name": "string.quoted.double.macro.inputrc", "begin": "\\G\"", "end": "\"|(?=$)", "patterns": [ { "include": "#escapes" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.inputrc" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.inputrc" } } }, { "name": "string.quoted.single.macro.inputrc", "begin": "\\G'", "end": "'|(?=$)", "patterns": [ { "include": "#escapes" } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.inputrc" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.inputrc" } } }, { "name": "entity.name.function.inputrc", "match": "\\G([-\\w]+)" }, { "name": "comment.line.ignored.inputrc", "begin": "(?\u003c=['\"\\s])\\s*(?=\\S)", "end": "$" } ], "beginCaptures": { "0": { "patterns": [ { "include": "etc#kolon" } ] } } } ] }, "keyName": { "patterns": [ { "name": "meta.key-name.quoted.inputrc", "begin": "\\G(\")", "end": "(\")|(?=$)", "patterns": [ { "include": "#keyNameInnards" } ], "beginCaptures": { "0": { "name": "string.quoted.double.inputrc" }, "1": { "name": "punctuation.definition.string.begin.inputrc" } }, "endCaptures": { "0": { "name": "string.quoted.double.inputrc" }, "1": { "name": "punctuation.definition.string.end.inputrc" } } }, { "name": "meta.key-name.quoted.inputrc", "begin": "\\G(')", "end": "(')|(?=$)", "patterns": [ { "include": "#keyNameInnards" } ], "beginCaptures": { "0": { "name": "string.quoted.single.inputrc" }, "1": { "name": "punctuation.definition.string.begin.inputrc" } }, "endCaptures": { "0": { "name": "string.quoted.single.inputrc" }, "1": { "name": "punctuation.definition.string.end.inputrc" } } }, { "name": "meta.key-name.unquoted.inputrc", "match": "\\G((?:[^\\\\:\\s]|\\\\.)+)", "captures": { "1": { "patterns": [ { "include": "#keyNameInnards" } ] } } } ] }, "keyNameInnards": { "patterns": [ { "match": "(?i)(-)?\\b(CONTROL|DEL|ESCAPE|ESC|LFD|META|NEWLINE|RETURN|RET|RUBOUT|SPACE|SPC|TAB)\\b", "captures": { "1": { "name": "punctuation.separator.dash.hyphen.inputrc" }, "2": { "name": "constant.character.key-name.symbolic.inputrc" } } }, { "include": "#escapes" }, { "match": "(-)?(\\S)", "captures": { "1": { "name": "punctuation.separator.dash.hyphen.inputrc" }, "2": { "name": "constant.character.key-name.literal.inputrc" } } } ] }, "main": { "patterns": [ { "include": "#comment" }, { "include": "#include" }, { "include": "#conditional" }, { "include": "#variable" }, { "include": "#keyBinding" } ] }, "variable": { "begin": "(?i)^\\s*(set)(?=\\s|$)[ \\t]*", "end": "$", "patterns": [ { "begin": "(?i)\\G(bell-style)(?=\\s|$)", "end": "(?i)(visible|audible|none)(?=\\s|$)|(?=$|#|\\S)", "beginCaptures": { "1": { "name": "variable.assignment.inputrc" } }, "endCaptures": { "1": { "name": "constant.language.bell-style.inputrc" } } }, { "begin": "(?i)\\G(editing-mode)(?=\\s|$)", "end": "(?i)(emacs|vi)(?=\\s|$)|(?=$|#|\\S)", "beginCaptures": { "1": { "name": "variable.assignment.inputrc" } }, "endCaptures": { "1": { "name": "constant.language.editing-mode.inputrc" } } }, { "contentName": "string.unquoted.inputc", "begin": "(?i)\\G(comment-begin|emacs-mode-string|vi-(?:cmd|ins)-mode-string)(?=\\s|$)\\s*", "end": "(?=$)", "patterns": [ { "include": "#escapes" } ], "beginCaptures": { "1": { "name": "variable.assignment.inputrc" } } }, { "begin": "(?i)\\G([-a-z0-9]+)(?=\\s|$)", "end": "(?i)(?:(on|off)(?=\\s|$)|([^#\\s]+))|(?=$|#)", "beginCaptures": { "1": { "name": "variable.assignment.inputrc" } }, "endCaptures": { "1": { "name": "constant.logical.bool.boolean.${1:/downcase}.inputrc" }, "2": { "patterns": [ { "include": "etc#num" }, { "include": "etc#bareword" } ] } } } ], "beginCaptures": { "1": { "name": "keyword.operator.set.inputrc" } } } } }