On 2021-10-27, Julio Guerrero wrote:
> I love vim and admire all the job done here. I have tried all in stackoverflow
> and other blogs without success. Ctrl + Right/Left is creating a lot issues on
> my developments it deletes lines and I have spent a lot of time fixing those
> changes , so I want to block this shortcut is not helping me. Would anybody
> please help me with this ?
How you fix it depends on what's causing it and whether you
experience this in normal mode or in insert mode. According to the
:help entries, Ctrl + Right/Left shouldn't do that; they should move
the cursor to the right or left by words.
:help <C-Right>
[count] WORDS forward. |exclusive| motion.
:help <C-Left>
[count] WORDS backward. |exclusive| motion.
:help i_<C-Right>
cursor one word forward (like "w" command)
:help i_<C-Left>
cursor one word back (like "b" command)
If those are the commands giving you problems, you can fix that by
mapping them to <Nop>, like this:
nmap <C-Right> <Nop>
nmap <C-Left> <Nop>
imap <C-Right> <Nop>
imap <C-Left> <Nop>
See also:
:help <Nop>
:help 05.4
:help map-commands
Those keys may instead have been remapped by one of your plugins.
You can check that by executing the following:
:verbose map <C-Right>
:verbose map <C-Left>
:verbose imap <C-Right>
:verbose imap <C-Left>
If any of those commands show you where those keys have been
remapped, you can check the documentation for that plugin to find
out how to disable them.
If none of that helps, come back here with what you tried and what
the results were and we can go from there.
One last thing. This is the Vim development list, vim_dev, which is
intended for reporting bugs and feature requests, not problems with
using Vim. For questions like yours, it is preferred that you use
the Vim user list, vim_use.
Regards,
Gary
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20211027162734.GB2195%40phoenix.