Re: No way to color-region(s) of text -- highlighter mode.

2006-08-07 Thread Nikolai Weibull
On 8/7/06, Mikolaj Machowski <[EMAIL PROTECTED]> wrote: Dnia poniedziałek, 7 sierpnia 2006 15:46, Charles E Campbell Jr napisał: [Vince Negri's conceal patch] This works only on character wise collapsing and also isn't perfect. When doing line wise concealing you will never now (with exceptio

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-07 Thread Mikolaj Machowski
Dnia poniedziałek, 7 sierpnia 2006 15:46, Charles E Campbell Jr napisał: > Mikolaj Machowski wrote: > >Full collapsing was discussed some time ago and dismissed because > >there is no good way to show theirs existence when collapsed. > > Hmm -- Vince Negri's "conceal" patch demonstrates, not postul

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-07 Thread Charles E Campbell Jr
Mikolaj Machowski wrote: Full collapsing was discussed some time ago and dismissed because there is no good way to show theirs existence when collapsed. Hmm -- Vince Negri's "conceal" patch demonstrates, not postulates, that this statement is incorrect. Its quite simple: the current line i

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-07 Thread Yakov Lerner
On 8/6/06, Mohsin <[EMAIL PROTECTED]> wrote: ... Does vim try to match the regexp at every point - or it can optimize and start matching from the given line? For :match', my guess is that vim needs to check only those characters visible on-screen, thus speed being dependent on screen-size not

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-07 Thread Benji Fisher
Vim does a lot of optimization of regular expressions, but I do not know how it would perform in this case. I would just try it and see. If it does not work well, that would be a good reason to try :syn match instead of :match . HTH --Benji Fisher On Sun,

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-06 Thread Mohsin
I can try making a large regexp. I was under the impression that alternating regexps can be exponentially slow. Is %l %c %v matching is implemented in constant time? ie. Does vim try to match the regexp at every point - or it can optimize and start matching from the given line? Nothing to do with

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread Nikolai Weibull
On 8/6/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Nikolai Weibull wrote: > It's always possible to add another type of mark that stays with the > text, whatever happens, and I don't think it should be too hard to > implement, see mark_col_adjust(). But Bram thought it would be > difficult

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread A.J.Mechelynck
Nikolai Weibull wrote: On 8/5/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: When breaking a line before a mark, the mark stays with the part-line before the line break: And I repeat: Bug? No. That's just the way marks work. And it's a misfeature in my opinion. It's always possible to ad

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread Nikolai Weibull
On 8/5/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: When breaking a line before a mark, the mark stays with the part-line before the line break: And I repeat: Bug? No. That's just the way marks work. And it's a misfeature in my opinion. It's always possible to add another type of mark t

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread A.J.Mechelynck
Yakov Lerner wrote: On 8/6/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Nikolai Weibull wrote: > On 8/5/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: > >> Nikolai Weibull wrote: > >> > However, it can sort of be simulated by having marks that stick to the >> > text position that they mark, in

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread Yakov Lerner
On 8/6/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Nikolai Weibull wrote: > On 8/5/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: > >> Nikolai Weibull wrote: > >> > However, it can sort of be simulated by having marks that stick to the >> > text position that they mark, instead of line + fixed c

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread A.J.Mechelynck
Nikolai Weibull wrote: On 8/5/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Nikolai Weibull wrote: > However, it can sort of be simulated by having marks that stick to the > text position that they mark, instead of line + fixed column. (We > don't have this kind of mark at the moment.) I

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread Nikolai Weibull
On 8/5/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Nikolai Weibull wrote: > However, it can sort of be simulated by having marks that stick to the > text position that they mark, instead of line + fixed column. (We > don't have this kind of mark at the moment.) IIUC, Vim's marks _are_ n

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread A.J.Mechelynck
Nikolai Weibull wrote: [...] However, it can sort of be simulated by having marks that stick to the text position that they mark, instead of line + fixed column. (We don't have this kind of mark at the moment.) nikolai IIUC, Vim's marks _are_ normally anchored to the text they mark, not to

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread Benji Fisher
On Fri, Aug 04, 2006 at 04:01:38PM -0700, Mohsin wrote: > > On 8/4/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: > >A.J.Mechelynck wrote: > >> Mohsin wrote: > >>> I want to use a highlighter mode on my text file, example: > >>> > >>> :color_region bold line1 col1 line2 col2 > >>> :color_region

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread Nikolai Weibull
On 8/5/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: - I don't know Emacs well enough to have a valid opinion regarding it; So don't. - I like Vim so much I have no incentive to learn Emacs; Seems like a very conservative way of thinking. - Discussion of Emacs features is not really on-to

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread A.J.Mechelynck
François Pinard wrote: [...] I did not really take position about if Vim or Emacs are better than one another, or wrong altogether :-). But I do have an opinion: both are great editors, each with their own many virtues and few weaknesses, each being a good source of inspiration and ideas for a

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread François Pinard
>[Mohsin]: >>Vim only has syntax coloring with regexps. Emacs has functions to >>apply properties to text blocks, and I was hoping vim has something >>comparable. [Mikolaj Machowski] >Of course it is possible: >:help /\%l >:help /\%c [François Pinard] Humph, not really! [Mikolaj

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-05 Thread Mikolaj Machowski
Dnia piątek, 4 sierpnia 2006 22:39, François Pinard napisał: > [Mikolaj Machowski] > > >[Mohsin]: > >>Vim only has syntax coloring with regexps. Emacs has functions to > >>apply properties to text blocks, and I was hoping vim has something > >>comparable. > > > >Of course it is possible: > >:help

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread A.J.Mechelynck
Suresh Govindachar wrote: [...] [snip entire para Tony wrote.] Tony, Your comments aren’t applicable to Francois. --Suresh Oops, sorry, the entire email sounded like a pro-Emacs rant to me, coming from that Mohsin guy who kept repeating "I came from Emacs, and your Vim regexps can't do it

RE: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread Suresh Govindachar
François Pinard wrote: > [Mikolaj Machowski] >> [Mohsin]: > >>> Vim only has syntax coloring with regexps. Emacs has functions to >>> apply properties to text blocks, and I was hoping vim has something >>> comparable. > >> Of course it is possible: > >> :help /\%l >> :help /\%c > > Humph,

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread A.J.Mechelynck
Mohsin wrote: The problem is I want to apply the highlighting to multiple blocks of text simultaneously, so regexp doesn't help. mohsin. :help /\| Best regards, Tony.

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread A.J.Mechelynck
François Pinard wrote: [Mikolaj Machowski] [Mohsin]: Vim only has syntax coloring with regexps. Emacs has functions to apply properties to text blocks, and I was hoping vim has something comparable. Of course it is possible: :help /\%l :help /\%c Humph, not really! Text propertie

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread A.J.Mechelynck
Mohsin wrote: I already tried your solution, it only works for a single region at a time On applying the same higlighting to second region and the first one is un-highlighted. Try this (the third command will unhilight the first region): :highlight User1 term=bold cterm=5 guibg=red match Us

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread Mohsin
The problem is I want to apply the highlighting to multiple blocks of text simultaneously, so regexp doesn't help. mohsin. On 8/4/06, Ilya <[EMAIL PROTECTED]> wrote: Mohsin wrote: > I want to use a highlighter mode on my text file, example: > > :color_region bold line1 col1 line2 col2 > :colo

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread Mohsin
I already tried your solution, it only works for a single region at a time On applying the same higlighting to second region and the first one is un-highlighted. Try this (the third command will unhilight the first region): :highlight User1 term=bold cterm=5 guibg=red match User1 /\%>54l.\%<

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread François Pinard
[Mikolaj Machowski] [Mohsin]: Vim only has syntax coloring with regexps. Emacs has functions to apply properties to text blocks, and I was hoping vim has something comparable. Of course it is possible: :help /\%l :help /\%c Humph, not really! Text properties in Emacs span text reg

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread A.J.Mechelynck
A.J.Mechelynck wrote: Mohsin wrote: I want to use a highlighter mode on my text file, example: :color_region bold line1 col1 line2 col2 :color_region bold 5 5 6 6 :color_region underline 5 5 6 6 I couldn't do this in vim. Vim only has syntax coloring with regexps. Emacs has functions to a

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread A.J.Mechelynck
Mohsin wrote: I want to use a highlighter mode on my text file, example: :color_region bold line1 col1 line2 col2 :color_region bold 5 5 6 6 :color_region underline 5 5 6 6 I couldn't do this in vim. Vim only has syntax coloring with regexps. Emacs has functions to apply properties to text

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread Mikolaj Machowski
Dnia piątek, 4 sierpnia 2006 18:42, Mohsin napisał: > I want to use a highlighter mode on my text file, example: > :color_region bold line1 col1 line2 col2 > :color_region bold 5 5 6 6 > :color_region underline 5 5 6 6 > > I couldn't do this in vim. Vim only has syntax coloring with regexps. >

Re: No way to color-region(s) of text -- highlighter mode.

2006-08-04 Thread Ilya
Mohsin wrote: I want to use a highlighter mode on my text file, example: :color_region bold line1 col1 line2 col2 :color_region bold 5 5 6 6 :color_region underline 5 5 6 6 I couldn't do this in vim. Vim only has syntax coloring with regexps. Emacs has functions to apply properties to text