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
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
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,
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
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
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
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),
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 &
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
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
>
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
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
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
13 matches
Mail list logo