issue #1529 , and specifically commit 609a8ee8c793856b8c1e6b7c553ee3475ca8308f , changed the behavior of X so that it does not move the anchor to the beginning of the line.
i find this quite unergonomic, since i cannot select blocks of lines just by repeated presses of X. instead, i need to do xXXX or <alt-x>XXX, both of which require more dexterity.
ironzorg already kindly provided a script to restore the old behavior:
def old_X %{
try %{
exec -draft \; <a-k>\n<ret>
exec X
} catch %{
exec <a-x><a-:>
}
}
map global normal X ': old_X<ret>'
but i think the new X will result in a worse user experience for most users, so i think we should revert to the old behavior unless we have a good reason to.
I noticed this too, and I also found it somewhat difficult.
I had a think and remapped in a different way:
map global normal x X<a-x>
map global normal X K<a-x>
So, x extends down, X extends up.
With this change, the original x (select one line, then move to next with subsequent press) is gone,
and, for example, selecting only the second full line changes from xx to jx.
Essentially, x has become like the old X.
I don't mean to suggest this approach is suitable for everyone or in line with Kakoune's design in general,
only that it works fine for me and pressing only x for both selecting one line and extending lines is a comfortable way of performing a common task.
I found this change for the worse too with regards to Xs behaviour.
related commits: https://github.com/mawww/kakoune/commit/28716ec058768bdc4fa13b0a9667604e6f307c4c and parent
This has been changed again, hopefully to a better behaviour. I figured that with the recent changes that made end of lines far more likely to be selected, we needed a better behaviour for X, and rewrote a slightly different (hopefully more robust) selection merging behaviour.
To be more precise, we are mostly back to the previous behaviour where X will select the full line.
Most helpful comment
I noticed this too, and I also found it somewhat difficult.
I had a think and remapped in a different way:
So,
xextends down,Xextends up.With this change, the original
x(select one line, then move to next with subsequent press) is gone,and, for example, selecting only the second full line changes from
xxtojx.Essentially,
xhas become like the oldX.I don't mean to suggest this approach is suitable for everyone or in line with Kakoune's design in general,
only that it works fine for me and pressing only
xfor both selecting one line and extending lines is a comfortable way of performing a common task.