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/pascal.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/pascal.kak')
| -rw-r--r-- | rc/filetype/pascal.kak | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rc/filetype/pascal.kak b/rc/filetype/pascal.kak index 8c70210b..eae45772 100644 --- a/rc/filetype/pascal.kak +++ b/rc/filetype/pascal.kak @@ -192,7 +192,7 @@ EOF define-command -hidden pascal-trim-indent %{ evaluate-commands -no-hooks -draft -itersel %{ - execute-keys <a-x> + execute-keys x # remove trailing white spaces try %{ execute-keys -draft s \h + $ <ret> d } } @@ -203,9 +203,9 @@ define-command -hidden pascal-indent-on-new-line %{ # preserve previous line indent try %{ execute-keys -draft <semicolon> K <a-&> } # cleanup trailing whitespaces from previous line - try %{ execute-keys -draft k <a-x> s \h+$ <ret> d } + try %{ execute-keys -draft k x s \h+$ <ret> d } # indent after certain keywords - try %{ execute-keys -draft k<a-x><a-k>(?i)(asm|begin|const|else|except|exports|finalization|finally|label|of|otherwise|private|property|public|protected|published|record|repeat|resourcestring|threadvar|try|type|uses|var|:)\h*$<ret>j<a-gt> } + try %{ execute-keys -draft kx<a-k>(?i)(asm|begin|const|else|except|exports|finalization|finally|label|of|otherwise|private|property|public|protected|published|record|repeat|resourcestring|threadvar|try|type|uses|var|:)\h*$<ret>j<a-gt> } } } ยง |
