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), on all lines

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 may

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 the

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 to

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 anything. Suppose you have the following