[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vim, tabs, and copying text



* Derrick 'dman' Hudson (dman@dman.ddts.net) [030412 20:47]:
> On Sun, Apr 13, 2003 at 01:41:35AM +0100, Karsten M. Self wrote:
> |     :r!cat
> |     <paste text>
> |     ^D
> 
> Cute.

Yeah, I like that, too.  Anyone really interested in saving keystrokes
might map this to <F10>, similar to the below.

> Just in case you (or someone else) is interested, I got this from
> somewhere on the 'net :

Just FYI, it's also in vim's ':help pastetoggle'.

> 
> " paste control
> map  <F10> :set paste<CR>
> map  <F11> :set nopaste<CR>
> imap <F10> <C-O>:set paste<CR>
> imap <F11> <nop>
> set pastetoggle=<F11>

Anyone know the reason this doesn't work?

imap <F11> <C-O>:set nopaste<CR>

It seems that vim ignores imap keystrokes when in paste mode, but still
honors pastetoggle (though I haven't seen the documentation that states
this (nor have I looked at the code yet); it's just my hunch).

I'd prefer that F10 always sets paste and F11 always unsets it, rather
than the modal F11 action.

good times,
Vineet
-- 
http://www.doorstop.net/
-- 
http://www.xenu.net		Scientology

Attachment: pgpmPuwYW0UlC.pgp
Description: PGP signature


Reply to: