Skip to main content
5 votes
Accepted

How not to let text in selection mode go to registers

Vim doesn't want you to lose the deleted text, so it stores the replaced selection in the default register; due to your 'clipboard' configuration, this includes the clipboard. The usual way to avoid ...
Ingo Karkat's user avatar
  • 17.9k
3 votes
Accepted

How to perform an action on search matches?

So you're referring to the search results that get highlighted when you have the 'hlsearch' option set. So, in effect, these are the search results. Your example has one more quirk to it, which is the ...
filbranden's user avatar
  • 29k
3 votes
Accepted

Why is `vmap` for both Visual *and* Select mode?

At the time we (maintainers of snippet/template engines) had mappings using :vmap which were targetting the select mode. I still have a few traces of that in my lh-brackets plugin. Also the mswin.vim ...
Luc Hermitte's user avatar
  • 17.5k
2 votes
Accepted

Is it possible to execute keys/commands in select mode?

By keys I mean like being Normal mode and pressing e (takes you to end of [next] word), by commands I mean like being in Normal mode and pressing Shift+; and typing :delete. Yes. From Select mode, ...
filbranden's user avatar
  • 29k
2 votes

How do I select till the end of a word?

This answer is perhaps a bit more broad than what you specifically asked in your question... But if you're interested in using select mode and motions such as Ctrl+Shift+Right to select to the end of ...
filbranden's user avatar
  • 29k
2 votes
Accepted

How do I select till the end of a word?

You can use ctrl-G to to enter select mode from visual mode (see :help v_CTRL-G). :nnoremap <C-S-Right> ve<C-G>
Andy Stewart's user avatar
  • 1,359
2 votes

How not to let text in selection mode go to registers

You did two Evils, and then the third Evil came and seized you. So what is an advice you seek for? "Select mode" and "Clipboard" are pure evil. Remove them from your vimrc and forget for good. Always ...
Matt's user avatar
  • 20.8k
1 vote

Map comma in select mode to exit select mode, enter insert mode, append a comma

You must use snoremap as your mappings' RHS contains LHS. And this is a good habit anyway. exit select mode, enter insert mode, [optionally: go the end of the last selection (which the cursor seems ...
Matt's user avatar
  • 20.8k

Only top scored, non community-wiki answers of a minimum length are eligible