created 2002 · complexity intermediate · author Kartik Agaram · version 6.0
Have you ever been annoyed by an over-zealous cabbrev? A simple way to temporarily disable it is
set invpaste. Very convenient in combination with the
'pastetoggle' key. Note however that
'pastetoggle' does not work if you are already in command-line mode, as documented in the help.
You can also simply press
<C-V> before whatever character (usually
<space>) that you type that will expand the abbreviation. This will insert the character literally without expanding the abbreviation.
Does anybody have a better way to disable cabbrev's? The Vim docs (a little above help abbreviate-local) say pressing <C-v> twice somewhere within the abbrev avoids expanding it. Doesn't work for me, though. Pressing <C-v><Space> works in the ':' prompt, but not while searching - what if I don't want to include a space in the pattern?