Re: patch: automatically enter paste mode

2006-09-15 Thread Yakov Lerner

On 9/13/06, Ian Kilgore <[EMAIL PROTECTED]> wrote:

On Wed, Sep 13, 2006 at 11:27:43AM +0300, Yakov Lerner wrote:
> Nice. So simple. I have couple of comments.
>
Thank you :)

> 1. Don't you need to reset 'paste' back to 'nopaste' when
> high cps stops ?
>
There is a hastily coded version of the patch that does this, but I
don't like it.  It seems hackier (most likely my fault), and stranger to
use.  That is, as far as I know, inavoidable, since I have to wait until
at least one second after the paste ends and the user starts typing
before I can know to end the paste.  I'm open to suggestions as to how
to do that better.  I'll attach both patches this time.

> 2. It would be better if cps be settable, not hardcoded to 30.
> Maybe value of 'autopaste' can be made the cps boundary
> 'set autopaste=30', value 0 disables ?
>
Good idea.  Fixed in this version.


I think this is useful feature if it can be made reliable.
How reliable is this detection ? What are cases when it breaks ?

Let's say there is 'nmap  ...' or 'imap  ...' or iabbr
where rhs has more that 30 chars (and autopaste threshold is 30 cps).
If user presses F5, will paste be [wrongly] triggered ? Do you check
whether chars come from mapping vs not from mapping ?

Yakov


Re: Oddity with :s and \%V

2006-09-15 Thread Bram Moolenaar

James Vega wrote:

> Given a buffer that contains:
> 
>   foo Xbar
>   baYXz qux
> Y
> If you visually select from the start of the word bar, to the end of the
> word baz and perform :'<,'>s/\%V\_.*\%V/X&Y/ the result will be:
> 
>   foo Xbar
>   bazYX qux
>   Y
> 
> Is it a bug that the second XY is inserted or am I misunderstanding how
> this is supposed to work?

It looks like the inserted text does change the Visual area, but
deleting the selected text doesn't.  I'll add a remark to the todo list.

-- 
Permission is granted to read this message out aloud on Kings Cross Road,
London, under the condition that the orator is properly dressed.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Patch 7.0.109

2006-09-15 Thread Bram Moolenaar

Patch 7.0.109
Problem:Lisp indenting is confused by escaped quotes in strings. (Dorai
Sitaram)
Solution:   Check for backslash inside strings. (Sergey Khorev)
Files:  src/misc1.c


*** ../vim-7.0.108/src/misc1.c  Tue Sep  5 20:56:11 2006
--- src/misc1.c Wed Sep 13 20:13:57 2006
***
*** 8074,8082 
}
if (*that == '"' && *(that + 1) != NUL)
{
!   that++;
!   while (*that && (*that != '"' || *(that - 1) == '\\'))
!   ++that;
}
if (*that == '(' || *that == '[')
++parencount;
--- 8074,8093 
}
if (*that == '"' && *(that + 1) != NUL)
{
!   while (*++that && *that != '"')
!   {
!   /* skipping escaped characters in the string */
!   if (*that == '\\')
!   {
!   if (*++that == NUL)
!   break;
!   if (that[1] == NUL)
!   {
!   ++that;
!   break;
!   }
!   }
!   }
}
if (*that == '(' || *that == '[')
++parencount;
*** ../vim-7.0.108/src/version.cThu Sep 14 21:36:35 2006
--- src/version.c   Fri Sep 15 20:15:40 2006
***
*** 668,669 
--- 668,671 
  {   /* Add new patch number below this line */
+ /**/
+ 109,
  /**/

-- 
ARTHUR:  No, hang on!  Just answer the five questions ...
GALAHAD: Three questions ...
ARTHUR:  Three questions ...  And we shall watch ... and pray.
 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: patch: automatically enter paste mode

2006-09-15 Thread A.J.Mechelynck

Ian Kilgore wrote:

Apologies for sounding impatient, but does anyone have any further
feedback on this?  (ie "go away", or "you /might/ be incorporated into
vim if you fix a, b, c, and w").

Thanks,
Ian



well, if you want replies at the cost of spamming the list, I'm not 
interested one way or the other at the moment.



Best regards,
Tony.


Oddity with :s and \%V

2006-09-15 Thread James Vega
Given a buffer that contains:

  foo bar
  baz qux

If you visually select from the start of the word bar, to the end of the
word baz and perform :'<,'>s/\%V\_.*\%V/X&Y/ the result will be:

  foo Xbar
  bazYX qux
  Y

Is it a bug that the second XY is inserted or am I misunderstanding how
this is supposed to work?

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>


signature.asc
Description: Digital signature


Re: Patch 7.0.105

2006-09-15 Thread A.J.Mechelynck

Li Qi wrote:

Hi Bram,

I have cancel the subscriber mail from vim-dev mail list, but I still
receive much mails every day, could you please remove my mail address
from vim-dev mail list.

Thanks,
Li Qi


Unsubscribing from the vim-dev list requires the following steps:

  1. Send an email to [EMAIL PROTECTED] . That email may have 
no body text, but its "From:" line must contain your subscribed address.
  2. Wait (usually a few seconds, sometimes a few minutes, depending on 
how often you fetch mail from your server) for a robot autoreply to the 
message you sent at step 1.
  3. The robot autoreply (step 2) is there to check that the message 
(step 1) was really from you. It will contain instructions of how to 
complete the unsubscribe.
  4. Do what the autoreply says. This usually means sending an email to 
an address containing a complicated pseudorandom key.
  5. Shortly after you complete step 4, the list mail for this list 
should stop coming in.



Best regards,
Tony.


Re: Convert to HTML patch. Opinions / Testing.

2006-09-15 Thread Edd Barrett

On 15/09/06, Benji Fisher <[EMAIL PROTECTED]> wrote:

I think the decision of
whether to include the  tags should be based on principles of logical
mark-up:  are these naturally paragraphs?


This depends upon if you are writing a book or some code. The spacing
of the lines should be governed by the whitespace of the sourcecode,
and I cant think of how you define a "paragraph of code".

But consider this:
The whole file is contained in a , so the gap introduced (if any)
will either be right at the top or bottom of the code (or both?),
neither of which are benificial to the format of the page.

Agree?

Regards

Edd


Re: Convert to HTML patch. Opinions / Testing.

2006-09-15 Thread Benji Fisher
On Thu, Sep 14, 2006 at 08:27:01PM +0100, Edd Barrett wrote:
> On 14/09/06, Mikolaj Machowski <[EMAIL PROTECTED]> wrote:
> > Dnia sobota, 9 września 2006 20:03, Edd Barrett napisał:
> >>
> >> - I removed 's because you cannot contain a  in a  according
> >> to w3. An unstyled  would make no difference in this case anyway.
> >
> >While I agree with most of your changes *where*  cannot be inside of
> >?
> >
> >m.
> 
> Your right. You can have spans in p's.. hmmm . I could have swore the
> validator moaned at me the first time i tried it.
> 
> Still the 's wouldnt make any difference to formatting in this
> case. If you really want them back I can alter the patch, but I dont
> really see the need.
> 
> best Regards
> 
> Edd

 I was wondering about that, too, but I was too shy to ask.  It
depends on the browser whether the  tag makes any difference to the
display; some browsers may leave extra space.  I think the decision of
whether to include the  tags should be based on principles of logical
mark-up:  are these naturally paragraphs?

my $0.02--Benji Fisher


Re: Re: Patch 7.0.105

2006-09-15 Thread Adam Mercer

On 15/09/06, Li Qi <[EMAIL PROTECTED]> wrote:


I have cancel the subscriber mail from vim-dev mail list, but I still
receive much mails every day, could you please remove my mail address
from vim-dev mail list.


Why not unsubscribe yourself?

http://www.vim.org/maillist.php

Cheers

Adam