This is so obvious that I am sure someone has already requested it, But I couldn't find it, Point me to the issue if it already exists.
I really loved Kakoune for the 6 months that I used it exclusively, but I had to give up because my pinkies were aching,(It is kinda funny that you spend a huge part of the intro talking about the virtues of modal editing and then removed the visual mode and force the user to keep the shift key all the time to expand the selection like Microsoft Word :). So why don't you implement the vim's visual mode? is there a technical reason that it can't be implemented?
Thanks for creating this great software, presentation, documentation, most of the editing model, all are top notch. :)
You can already do this by using declare-user-mode.
is it something trivial to add fix the anchor so that movements add to the selection? can you send a link to an implementation of such a mode?
What about holding J or X? And C?
I don't want to hold down the shift key all the time. Maybe I am getting you wrong. do you mean I should press the Capslock?
Mine is highly customized and tyed to my keyboard layout. But it鈥檚 more boring than complicated, really. Here is an example for one mapping.
declare-user-mode extend
map -docstring "extend mode" global normal v ": enter-user-mode extend <ret>"
map -docstring "extend left" global extend h "H: enter-user-mode extend <ret>"
Rinse and repeat.
Depending on how much you want to vim-visualizedify, you can replace the re-entering of the mode with the -lock switch.
thanks, I see, I'll try it, But it still seems to me that this should be in Kakoune by default, J is just Shift+j, not better than C-p C-n in Emacs. don't you agree this is a necessary feature?
I agree there are some mismatches depending on users habits and visual mode can be argued for, but as my first comment implied, I鈥檓 afraid not :smile:, because you can basically have it anyway by mapping. The main dev made a default choice and we can be grateful to reap overall his work freely so changing the default on this point on our side or publishing it as a pluggin, is not too much, I think :wink:.
I agree that we can do it, but Kakoune tries to be a better vim. this is from the intro:
"""
Kakoune tries hard to fix one of the big problems with the vi model .... 5dw will delete to next five words, if you then realize that was one word too many, you need to undo, go back to your initial position, and try again with 4dw. In Kakoune, you would do 5W, see immediately that one more word than expected was selected, type BH to remove that word from the selection, then d to delete.
"""
But the truth is that in Vim you press v, then 5h, then you realize you made a mistake press b l and then d. so the Vim does a better job in this example, because you press v and release it, but in Kakoune you press the Shift, but you need to hold it down as well to press b and h. this gets worse when your initial guess was more wrong.
So I think this is an important issue that needs to be addressed, whether the original developer has time or not I don't know, But I think this is a big issue because it is directly about the goal of Kakoune.
a barebones visual-mode:
declare-user-mode visual-mode
define-command visual-mode %{ evaluate-commands %sh{
for key in w b e l h j k x; do # add more keys you want to shift-lock
printf "%s\n" "map global visual-mode $key <s-$key> -docstring %{Shift+$key}"
done
printf "enter-user-mode -lock visual-mode\n"
}}
I really loved Kakoune for the 6 months that I used it exclusively, but I had to give up because my pinkies were aching
Get an ergonomic QMK keyboard from Boardsource or somewhere. You can program any QMK keyboard with home row mods (I would recommend Shift and Escape both go on your thumbs). You should also configure these #defines, because the experience will be subpar otherwise.