Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread Charles E Campbell Jr
A.J.Mechelynck wrote: It should be possible (though less obvious) to do it with only a substitute. Let's try: :'<,'>s/^.*\S.*$/# \0 i.e. prepend a hash sign and a space wherever we find start-of-line, zero or more of anything, one nonblank, zero or more of anything, end-of-line (in th

Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread Meino Christian Cramer
From: "A.J.Mechelynck" <[EMAIL PROTECTED]> Subject: Re: Commenting out TeX-text line by line in V-mode Date: Fri, 17 Nov 2006 17:09:41 +0100 > Meino Christian Cramer wrote: > > From: "A.J.Mechelynck" <[EMAIL PROTECTED]> > [...] > >> It should b

Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread A.J.Mechelynck
Meino Christian Cramer wrote: From: "A.J.Mechelynck" <[EMAIL PROTECTED]> [...] It should be possible (though less obvious) to do it with only a substitute. Let's try: :'<,'>s/^.*\S.*$/# \0 i.e. prepend a hash sign and a space wherever we find start-of-line, zero or more of anything,

Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread Meino Christian Cramer
From: "A.J.Mechelynck" <[EMAIL PROTECTED]> Subject: Re: Commenting out TeX-text line by line in V-mode Date: Fri, 17 Nov 2006 16:18:14 +0100 > Charles E Campbell Jr wrote: > > Meino Christian Cramer wrote: > > > >> From: Charles E Campbell Jr <[EMAIL P

Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread Meino Christian Cramer
From: Charles E Campbell Jr <[EMAIL PROTECTED]> Subject: Re: Commenting out TeX-text line by line in V-mode Date: Fri, 17 Nov 2006 09:57:12 -0500 > Meino Christian Cramer wrote: > > >From: Charles E Campbell Jr <[EMAIL PROTECTED]> > >Subject: Re: Commenting out T

Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread A.J.Mechelynck
Charles E Campbell Jr wrote: Meino Christian Cramer wrote: From: Charles E Campbell Jr <[EMAIL PROTECTED]> Subject: Re: Commenting out TeX-text line by line in V-mode Date: Thu, 16 Nov 2006 13:34:16 -0500 How about :[range]g/\S/s/^/%/ which means: over the selected range (which

Re: Commenting out TeX-text line by line in V-mode

2006-11-17 Thread Charles E Campbell Jr
Meino Christian Cramer wrote: From: Charles E Campbell Jr <[EMAIL PROTECTED]> Subject: Re: Commenting out TeX-text line by line in V-mode Date: Thu, 16 Nov 2006 13:34:16 -0500 How about :[range]g/\S/s/^/%/ which means: over the selected range (which may be the visual range),

Re: Commenting out TeX-text line by line in V-mode

2006-11-16 Thread Meino Christian Cramer
From: Charles E Campbell Jr <[EMAIL PROTECTED]> Subject: Re: Commenting out TeX-text line by line in V-mode Date: Thu, 16 Nov 2006 13:34:16 -0500 > Meino Christian Cramer wrote: > > > I thought there would be one command to achieve the same effect > > instead of &

Re: Commenting out TeX-text line by line in V-mode

2006-11-16 Thread Charles E Campbell Jr
Meino Christian Cramer wrote: I thought there would be one command to achieve the same effect instead of """doing it the wrong way""" first and the """correct it""" by an additional command... Well, sure there is. Its Vim, isn't it? How about :[range]g/\S/s/^/%/ which means: over the s

Re: Commenting out TeX-text line by line in V-mode

2006-11-16 Thread Meino Christian Cramer
From: "A.J.Mechelynck" <[EMAIL PROTECTED]> Subject: Re: Commenting out TeX-text line by line in V-mode Date: Thu, 16 Nov 2006 05:20:13 +0100 > Meino Christian Cramer wrote: > > Hi, > > > > a question more driven by curiosity than by the need to change >

Re: Commenting out TeX-text line by line in V-mode

2006-11-16 Thread Charles E Campbell Jr
Meino Christian Cramer wrote: As a vim newbie I would do that using block oriented visual mode on the first line and I-nserting a '%' (TeX's comment sign), which results in: % bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats bla blabla % foo bar gnu gnats % bla blabla foo bar gnu g

Re: Commenting out TeX-text line by line in V-mode

2006-11-16 Thread Dmitriy Yamkovoy
Or you could skip step one, and only add percent signs on the lines with anything in them: (select lines visually) :'<,'>s/^\(.\)/% \1 -Dmitriy On 11/15/06, A.J.Mechelynck <[EMAIL PROTECTED]> wrote: Meino Christian Cramer wrote: > Hi, > > a question more driven by curiosity than by the need t

Re: Commenting out TeX-text line by line in V-mode

2006-11-15 Thread A.J.Mechelynck
Meino Christian Cramer wrote: Hi, a question more driven by curiosity than by the need to change anything. Suppose you have the following TeX-text: bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats bla blabla foo bar gnu gnats b