How do I create a mapping that works only in normal and operator

pending mode (but not in visual mode)? Using “:map” creates a mapping that works in normal, visual+select mode and operator pending mode. You can use “:nmap” to have the mapping only work in normal mode and “:vmap” to have the mapping only be defined for visual and select mode or use “:omap” to have the mapping only defined in operator pending mode. But if you want to have a mapping defined, that works in both operator pending mode and normal mode, but not in visual and select mode, you need to first define the mapping using “:map” and afterwards delete the mapping for visual and select mode: :map <f3> <your mapping here> :vunmap <f3>

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind