diff options
| author | Frank LENORMAND <lenormf@gmail.com> | 2020-06-03 15:17:32 +0300 |
|---|---|---|
| committer | Frank LENORMAND <lenormf@gmail.com> | 2020-06-03 15:42:38 +0300 |
| commit | 24c51694008351cf33604f5fa06ea49c0d106487 (patch) | |
| tree | b0927ba57b2e09e601de8a0ddca79b4c4e07260c /rc/detection | |
| parent | a56a03c454cd806e01617fb76af7c9ce7e374afc (diff) | |
src: Introduce a <percent> named key
Similarly to the <semicolon> key, make it easier to write
`:execute-keys` commands by replacing <percent> with `%`.
Highlighters can keep escaping the sign when regular expressions are
not quoted, but built-in scripts that use `%` as an editing primitive
have been modified to use the named key, for clarity.
Diffstat (limited to 'rc/detection')
| -rw-r--r-- | rc/detection/modeline.kak | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rc/detection/modeline.kak b/rc/detection/modeline.kak index b9e4bb70..3784a081 100644 --- a/rc/detection/modeline.kak +++ b/rc/detection/modeline.kak @@ -96,7 +96,7 @@ define-command -hidden modeline-parse-impl %{ # [text]{white}{vi:|vim:|Vim:|ex:}[white]se[t] {options}:[text] define-command modeline-parse -docstring "Read and interpret vi-format modelines at the beginning/end of the buffer" %{ try %{ evaluate-commands -draft %{ - execute-keys \%s\A|.\z<ret> %opt{modelines}k <a-x> %opt{modelines}X \ + execute-keys <percent> s\A|.\z<ret> %opt{modelines}k <a-x> %opt{modelines}X \ s^\S*?\s+?(vim?|kak(oune)?):\s?[^\n]+<ret> <a-x> evaluate-commands -draft -itersel modeline-parse-impl } } |
