I'm new to Neovim, I want to use Shift+Left and Shift+Right to select text, but I couldn't find any plugin/solution to achieve that.
I'm wondering if it is possible to do that. If it is achievable, what are the tools / Lua scripts I can use to make that. Or if it's not achievable, what's the way you'll prefer to select text?
I was trying to use some Visual Mode keymap to make it into what I want, but I just can't make it work.
By using the two mappings, you can use
<meta> + <left>
(<ctrl> + <g>
is used in my mapping) select text in insert mode. However, there are still many areas that are not covered, such as unable to use in the terminal or command mode.This mapping simply simulates keystrokes based on the current mode. If the current mode is insert mode
<ctrl-o>
v
to enter visual mode<ctrl-g>
to enter select mode.the second mapping is similar as the first one...
This is a very rudimentary implementation. If there are better methods of implementation, please kindly advise~
by the way, in insert mode, I am more accustomed to using some shortcuts:
<ctrl-w>
delete a word before cursor<ctrl-h>
delete a char before cursor, likebackspace
<ctrl-u>
clear the line:h i_<some-key>