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 /src/normal.cc | |
| 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 'src/normal.cc')
| -rw-r--r-- | src/normal.cc | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/normal.cc b/src/normal.cc index 27bdb3dd..51027529 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -2294,10 +2294,8 @@ static constexpr HashMap<Key, NormalCmd, MemoryDomain::Undefined, KeymapBackend> { {alt('h')}, {"select to line begin", repeated<select<SelectMode::Replace, select_to_line_begin<false>>>} }, { {alt('H')}, {"extend to line begin", repeated<select<SelectMode::Extend, select_to_line_begin<false>>>} }, - { {'x'}, {"select line", repeated<select<SelectMode::Replace, select_line>>} }, - { {'X'}, {"extend line", repeated<select<SelectMode::Extend, select_line>>} }, - { {alt('x')}, {"extend selections to whole lines", select<SelectMode::Replace, select_lines>} }, - { {alt('X')}, {"crop selections to whole lines", select<SelectMode::Replace, trim_partial_lines>} }, + { {'x'}, {"extend selections to whole lines", select<SelectMode::Replace, select_lines>} }, + { {alt('x')}, {"crop selections to whole lines", select<SelectMode::Replace, trim_partial_lines>} }, { {'m'}, {"select to matching character", select<SelectMode::Replace, select_matching<true>>} }, { {alt('m')}, {"backward select to matching character", select<SelectMode::Replace, select_matching<false>>} }, |
