On Mar 16, 8:31 pm, howard Schwartz <[email protected]> wrote:
> I would like to temporarily disable abbreviations so they work in insert and
> search mode, but not in command line mode. Unfortunately if you define an
> abbreviation in ex mode with cab  you also enable it in search mode.
>
> Something like this works, for starters:
>
> nnoremap : :set paste<CR>:
>
> That disables them in command mode. But now I have to enable them back again,
> somehow when I leave command mode and return to normal mode. I could use an
> autocmmand to set and then unset paste, when entering and leaving a cmd
> window, but there are no autocommands for entering and leaving command mode.
>
> Any ideas?

:help :ab
:help :iab
:help :cab

2. Abbreviations                        *abbreviations* *Abbreviations*

Abbreviations are used in Insert mode, Replace mode and Command-line
mode.

:ab[breviate] [<expr>] {lhs} {rhs}
add abbreviation for {lhs} to {rhs}.  If {lhs} already existed it is
replaced with the new {rhs}.  {rhs} may contain spaces.

:ia[bbrev] [<expr>] [lhs] [rhs]
same as ":ab", but for Insert mode only.  {not in Vi}

:ca[bbrev] [<expr>] [lhs] [rhs]
same as ":ab", but for Command-line mode only.  {not in Vi}

-- 
You received this message from the "vim_use" 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

Reply via email to