how to make 'set paste' compatible with 'formatoptions'?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

how to make 'set paste' compatible with 'formatoptions'?

phyrster
Hi vimmers,

I need 'set paste' to work while have 'formatoptions', 'textwidth' and
'linebreak' work as well. How to make these settings compatible with each
other?

--
regards
bxuef

A journey of a thousand miles starts under one's feet.
                -- Meng Zi
Reply | Threaded
Open this post in threaded view
|

Re: how to make 'set paste' compatible with 'formatoptions'?

Gary Johnson
On 2005-11-10, bxuefeng <[hidden email]> wrote:
> Hi vimmers,
>
> I need 'set paste' to work while have 'formatoptions', 'textwidth' and
> 'linebreak' work as well. How to make these settings compatible with each
> other?

You don't.  The whole purpose of 'paste' is to inhibit the behavior
of those options while you're pasting.  That being said, there may
be a solution to your problem.  What are you trying to accomplish?

As a guess, if you're trying to format text as you paste it with the
mouse, you might try holding down the shift key at the same time
that you click the middle mouse button.  That works with an xterm
anyway.  I don't know what you'd do for Windows.

Gary

--
Gary Johnson                 | Agilent Technologies
[hidden email]     | Wireless Division
                             | Spokane, Washington, USA
Reply | Threaded
Open this post in threaded view
|

Re: how to make 'set paste' compatible with 'formatoptions'?

phyrster
On 18:01 Wed 09 Nov 2005, Gary Johnson wrote:

> On 2005-11-10, bxuefeng <[hidden email]> wrote:
> > Hi vimmers,
> >
> > I need 'set paste' to work while have 'formatoptions', 'textwidth' and
> > 'linebreak' work as well. How to make these settings compatible with each
> > other?
>
> You don't.  The whole purpose of 'paste' is to inhibit the behavior
> of those options while you're pasting.  That being said, there may
> be a solution to your problem.  What are you trying to accomplish?
thank you for your reply. The situation I have is:

I need 'set paste' to work in order to input Chinese (iminsert need it in
order to input Chinese correctly), but I also need 'set formatoptions, set wrap'
to wrap lines when I reply email messages.

So I am caught in a dilemma. What to do?

--
regards
bxuef

To err is human, but when the eraser wears out before the pencil,
you're overdoing it a little.
Reply | Threaded
Open this post in threaded view
|

Re: how to make 'set paste' compatible with 'formatoptions'?

Gary Johnson
On 2005-11-10, bxuefeng <[hidden email]> wrote:

> On 18:01 Wed 09 Nov 2005, Gary Johnson wrote:
> > On 2005-11-10, bxuefeng <[hidden email]> wrote:
> > > Hi vimmers,
> > >
> > > I need 'set paste' to work while have 'formatoptions', 'textwidth' and
> > > 'linebreak' work as well. How to make these settings compatible with each
> > > other?
> >
> > You don't.  The whole purpose of 'paste' is to inhibit the behavior
> > of those options while you're pasting.  That being said, there may
> > be a solution to your problem.  What are you trying to accomplish?
> thank you for your reply. The situation I have is:
>
> I need 'set paste' to work in order to input Chinese (iminsert need it in
> order to input Chinese correctly), but I also need 'set formatoptions, set wrap'
> to wrap lines when I reply email messages.
>
> So I am caught in a dilemma. What to do?

Thanks, that helped me understand the problem.  However, I know
nothing about IM, so I don't think I'll be able to help you with
this.  I did try to search the help file mbyte.txt for "paste", but
found nothing.

Regards,
Gary

--
Gary Johnson                 | Agilent Technologies
[hidden email]     | Wireless Division
                             | Spokane, Washington, USA
Reply | Threaded
Open this post in threaded view
|

Re: how to make 'set paste' compatible with 'formatoptions'?

adah
In reply to this post by phyrster
bxuefeng wrote:

> I need 'set paste' to work in order to input Chinese (iminsert need it
> in order to input Chinese correctly), but I also need 'set
> formatoptions, set wrap' to wrap lines when I reply email messages.

What strange environments are you in?  I am Chinese too and I never knew
such problems.

If you are really stuck, you may use the command `gq' (:help gq) to
reformat the paragraph after you finished typing Chinese and `set
nopaste'.  I have `formatoptions=tcqm'.

Best regards,

Yongwei