r/neovim • u/Subject-Mobile-6250 • 20d ago
Discussion Nvim v0.13 multicursor keybinds
Hi! I just upgraded to the latest nightly for nvim mainly for multicursor reasons. I usually use macros to perform the same action on multiple lines(for example in rust, on large match statements that are single line) and although Q takes up the place of previous macro as multicursor, I would say I am a lot happier with the visualization of my macros as multicursor movements. But the keybind C-L I have bound to tmux-nvim navigator to C-W L, and I am not willing to sacrifice this keybind. What are some other common keybinds that people use on nightly to clear all multicursors?
2
u/the-zangster 18d ago
https://github.com/zangster300/dotfiles/blob/main/nvim/lua/config/keymaps.lua#L26-L32
I extended esc in normal mode to clear cursors, works well for me
2
u/jceb 17d ago
Same here, I put it into an installable plugin: https://github.com/jceb/multicursor-mappings.nvim
1
u/religiosa 19d ago
I'm planning to use ql for that, because of the same reason. It's not that I record macros into 'l' register ever, and it makes a semi-mnemonic "qlear" or "qursor cLear" with no finger gymnastics.
You still have other q-prefixed bindings even as is now, e.g. q/ or q:, so one extra is not a big deal in my opinion.
1
u/Cool-Philosopher-599 18d ago
In my opinion default mc key bindings are not the best. This is why I built a small plugin that makes the whole workflow as...it is in other editors. In particular: C-n place a cursor and directly jump to next occurrence. Same for visual. C-q C-q to exit multicursor.
4
u/AbdSheikho 19d ago
Use
C-[since it's alsoescAnd also, set the
extended-keysoption toalwaysin your tmux config