vile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vile] comment leaders and reformatting


From: Thomas Dickey
Subject: Re: [vile] comment leaders and reformatting
Date: Sat, 5 Jun 2010 17:25:01 -0400 (EDT)

On Sat, 5 Jun 2010, address@hidden wrote:


Hello all,

I'm a recent vim convert and I have few lingering issues before I'm a full
convert.  When working with TCL files I prefer my comment lines to look like
this.

        ;# comment line 1
        ;# comment line 2
        ;# comment line 3
        ;# comment line 4

In vim if I were to edit one of the comment lines and make it a very long line
I could use the gq} command to reformat my comments.  This in combination with
the 'comments' setting will reformant the block of comments inserting the ';#'
sequence at the beginning of each line.

Two parts -

a) settings

vile uses the comment-prefix pattern, which for this case would be set
something like (in your .vilerc file):

~with define-submode tcl
set comment-prefix='^\s*;# '
~endwith

That's the same as

define-submode tbl set comment-prefix='^\s*;# '

b) reformatting

That gq} looks like vile's

        format-til next-paragraph

"format-til" is normally bound to ^A-f (control/A, f) and ^A-j.
With those bindings, you could do the analogous ^A, f, }.

Something like that (I'm usually using screen, which owns ^A...)

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]