diff options
| author | Maxime Coste <mawww@kakoune.org> | 2022-03-17 09:20:07 +1100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2022-07-05 08:43:40 +1000 |
| commit | ef8a11b3dbefb8a1222974a8c34e15fa006d56e0 (patch) | |
| tree | e66d71d0a5d67c6bc43d4d5977b8468d0335b62d /rc/filetype/pug.kak | |
| parent | 046be3b06ce41922e363c742ee9470f0ac885d4b (diff) | |
Make `x` just select the full lines
`x` is often criticized as hard to predict due to its slightly complex
behaviour of selecting next line if the current one is fully selected.
Change `x` to use the previous `<a-x>` behaviour, and change `<a-x>` to
trim to fully selected lines as `<a-X>` did.
Adapt existing indentation script to the new behaviour
Diffstat (limited to 'rc/filetype/pug.kak')
| -rw-r--r-- | rc/filetype/pug.kak | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rc/filetype/pug.kak b/rc/filetype/pug.kak index 9bb83d72..f9520bbe 100644 --- a/rc/filetype/pug.kak +++ b/rc/filetype/pug.kak @@ -62,7 +62,7 @@ add-highlighter shared/pug/code/ regex ((?:\.[A-Za-z][A-Za-z0-9_-]* define-command -hidden pug-trim-indent %{ # remove trailing white spaces - try %{ execute-keys -draft -itersel <a-x> s \h+$ <ret> d } + try %{ execute-keys -draft -itersel x s \h+$ <ret> d } } define-command -hidden pug-indent-on-new-line %{ @@ -72,7 +72,7 @@ define-command -hidden pug-indent-on-new-line %{ # filter previous line try %{ execute-keys -draft k : pug-trim-indent <ret> } # copy '//', '|', '-' or '(!)=' prefix and following whitespace - try %{ execute-keys -draft k <a-x> s ^\h*\K[/|!=-]{1,2}\h* <ret> y gh j P } + try %{ execute-keys -draft k x s ^\h*\K[/|!=-]{1,2}\h* <ret> y gh j P } # indent unless we copied something above try %{ execute-keys -draft <a-gt> <space> b s \S <ret> g l <a-lt> } } |
