Re: vim, tabs, and copying text
On Sunday 13 April 2003 05:32, Derrick 'dman' Hudson wrote:
> On Sun, Apr 13, 2003 at 01:41:35AM +0100, Karsten M. Self wrote:
> | > I also get this when copying from other programs into VIM. Any ideas?
> | My preferred solution:
> | :r!cat
> | <paste text>
> | ^D
> | This doesn't require two mode changes (insert/command, paste/nopaste)
> | for pase ops.
> Just in case you (or someone else) is interested, I got this from
> somewhere on the 'net :
> " 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>
> This only requires 1 keypress to switch back and forth (regardless of
> whether you're currently in insert or normal mode).
Another possibility is not to touch the mouse at all and not to switch
any paste-mode by using <C-R><C-O>* , which I have mapped to <C-P>.
So I just use my preferred motion commands to find the plasce where
to put the text and then paste with one singe keystroke.
There are also means to adjust indent autoatically (with <C-R><C-P>*)