Tuesday, May 3, 2011

Re: Temporarily Disabling All imaps and inoremaps

Thanks ZyX. Unfortunately, it appears that :set paste also resets the
language. In fact, when :set paste is enabled, you can't even manually
set the keymap. What I'm currently doing but isn't very effective
(because some plugins may add their own imaps and inoremaps) is that I
run I mapped a macro to run :imapclear. When I want my imaps +
inoremaps back, I source my $MYVIMRC file which contains them. It's not
elegant at all. I'm looking for a cleaner solution. Is there some way
for example to copy them into a reg, run imapclear, and then restore
them? Thanks.


On Wed, 04 May 2011 00:12 +0400, "ZyX" <zyx.vim@gmail.com> wrote:
> Reply to message «Temporarily Disabling All imaps and inoremaps»,
> sent 23:56:30 04 May 2011, Wednesday
> by Mathew Brown:
>
> I do not know, how your default imaps and inoremaps can prevent you from
> editing
> a file using a different character set, but to disable them completely
> you can
> use 'paste' option: do `:set paste' when you want them disabled and `set
> nopaste' when you don't. Note that it will disable automatic indentation,
> tabs
> expansion, automatic wrap as well. The only exception is 'pastetoggle'
> key: you
> will still be able to unset paste using it without leaving insert mode if
> you
> set this option somewhere.
>
> Original message:
> > Hi,
> >
> > I was wondering if there is any way to temporarily disable all imaps
> > and inoremaps. I sometimes need to edit a file using a different
> > character set and my default imaps and inoremaps can get in the way.
> > So is some way to disable them until I finish this and then enable
> > them again? Thanks.
>
> Email had 1 attachment:
> + signature.asc
> 1k (application/pgp-signature)
--
Mathew Brown
mathewbrown@fastmail.fm

--
http://www.fastmail.fm - Access your email from home and the web

--
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

No comments: