Send vile mailing list submissions to
address@hidden
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.nongnu.org/mailman/listinfo/vile
or, via email, send a message with subject or body 'help' to
address@hidden
You can reach the person managing the list at
address@hidden
When replying, please edit your Subject line so it is more specific
than "Re: Contents of vile digest..."
Today's Topics:
1. comment leaders and reformatting (address@hidden)
2. Re: comment leaders and reformatting (Thomas Dickey)
3. Re: comment leaders and reformatting (address@hidden)
4. Re: comment leaders and reformatting (Thomas Dickey)
5. Re: comment leaders and reformatting (Thomas Dickey)
6. Re: comment leaders and reformatting (Paul Fox)
7. Re: comment leaders and reformatting (Brendan O'Dea)
8. Re: comment leaders and reformatting (Thomas Dickey)
----------------------------------------------------------------------
Message: 1
Date: Sat, 5 Jun 2010 17:15:17 -0400
From: address@hidden
Subject: [vile] comment leaders and reformatting
To: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii
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.
Anyone have any hints on how I can accomplish the same thing in vile?
Thanks,
Wayne
------------------------------
Message: 2
Date: Sat, 5 Jun 2010 17:25:01 -0400 (EDT)
From: Thomas Dickey <address@hidden>
Subject: Re: [vile] comment leaders and reformatting
To: address@hidden
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
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
------------------------------
Message: 3
Date: Sat, 5 Jun 2010 18:18:08 -0400
From: address@hidden
Subject: Re: [vile] comment leaders and reformatting
To: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii
Thomas,
Excellent, thank you for the reply.
I'm not always diligent about ';#', some of my comments begin with just '#'
so
I ended up with this:
comment-prefix='^\s*;\?# '
Also note I was unable to use the 'set' command as you've specified below,
it
did work without the 'set' command however. I assume when defining options
for submodes the 'set' command is unnecessary?
I tend to struggle with what requires escaping in vi-style regular
expressions.
At first I tried this '^\s*;?#'. Is there a definitive list or a set of
rules
that govern what should and should not be escaped?
Ahhh yes, I use screen all the time as well. Have you found a convenient
replacement for ^a? Right now I'm being lazy and using '^a a'.
Thanks for the assistance and for maintaining the vile editor.
Wayne
On Sat, Jun 05, 2010 at 05:25:01PM -0400, Thomas Dickey wrote:
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
------------------------------
Message: 4
Date: Sat, 5 Jun 2010 18:54:04 -0400 (EDT)
From: Thomas Dickey <address@hidden>
Subject: Re: [vile] comment leaders and reformatting
To: address@hidden
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Sat, 5 Jun 2010, address@hidden wrote:
Thomas,
Excellent, thank you for the reply.
I'm not always diligent about ';#', some of my comments begin with just
'#' so
I ended up with this:
comment-prefix='^\s*;\?# '
Also note I was unable to use the 'set' command as you've specified below,
it
did work without the 'set' command however. I assume when defining
options
for submodes the 'set' command is unnecessary?
yes (sorry about that). The name=value stuff is parsed the same, but
there's no "set" keyword there.
I tend to struggle with what requires escaping in vi-style regular
expressions.
At first I tried this '^\s*;?#'. Is there a definitive list or a set of
rules
that govern what should and should not be escaped?
I usually refer to the "Regular Expressions" section in the help-file
(vile.hlp). Also, for debugging long patterns, I find it useful to turn
visual-matches to reverse, and just try searching with a given pattern:
set visual-matches=reverse
set nooverlap-matches
Ahhh yes, I use screen all the time as well. Have you found a convenient
replacement for ^a? Right now I'm being lazy and using '^a a'.
no - the keystrokes get complicated. I generally mark a line and format
from the :-line (or if I'm doing something repetitive, I bind 'K' to
whatever's useful at the moment). The other people using vile tend to use
the fancier key-bindings...
Thanks for the assistance and for maintaining the vile editor.
Wayne
On Sat, Jun 05, 2010 at 05:25:01PM -0400, Thomas Dickey wrote:
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
_______________________________________________
vile mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/vile
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
------------------------------
Message: 5
Date: Sat, 5 Jun 2010 19:35:10 -0400 (EDT)
From: Thomas Dickey <address@hidden>
Subject: Re: [vile] comment leaders and reformatting
To: address@hidden
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Sat, 5 Jun 2010, Thomas Dickey wrote:
On Sat, 5 Jun 2010, address@hidden wrote:
Ahhh yes, I use screen all the time as well. Have you found a convenient
replacement for ^a? Right now I'm being lazy and using '^a a'.
no - the keystrokes get complicated. I generally mark a line and format
from
the :-line (or if I'm doing something repetitive, I bind 'K' to whatever's
useful at the moment). The other people using vile tend to use the
fancier
key-bindings...
more to the point, ^A and ^X are bound to functions, and it would be
possible to bind another character to the same functions, e.g., 'K'
or 'g'.
A quick check seems to show this is working. I did
:describe-bindings
:bind-key cntl_a-prefix g
and the binding-list was updated (on the screen), and gf} formats a
paragraph.
(report bugs ;-)
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
------------------------------
Message: 6
Date: Sat, 05 Jun 2010 21:31:15 -0400
From: Paul Fox <address@hidden>
Subject: Re: [vile] comment leaders and reformatting
To: Thomas Dickey <address@hidden>
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: text/plain; charset="us-ascii"
thomas wrote:
A quick check seems to show this is working. I did
:describe-bindings
:bind-key cntl_a-prefix g
and the binding-list was updated (on the screen), and gf} formats a
paragraph.
(report bugs ;-)
:-) while i'm sure i/we tested that ability to rebind, it's
certainly been a while!
paul
=---------------------
paul fox, address@hidden (arlington, ma, where it's 68.7 degrees)
------------------------------
Message: 7
Date: Sun, 6 Jun 2010 19:07:56 +1000
From: "Brendan O'Dea" <address@hidden>
Subject: Re: [vile] comment leaders and reformatting
To: address@hidden
Message-ID:
<address@hidden>
Content-Type: text/plain; charset=ISO-8859-1
On 6 June 2010 08:18, <address@hidden> wrote:
Ahhh yes, I use screen all the time as well. Have you found a convenient
replacement for ^a? Right now I'm being lazy and using '^a a'.
I use the following in my ~/.screenrc:
escape ^]]
as I often find applications which use ^a (thanks mostly to readline).
This is the same as the telnet escape, but I don't tend to use that
from within screen.
------------------------------
Message: 8
Date: Sun, 6 Jun 2010 05:37:17 -0400 (EDT)
From: Thomas Dickey <address@hidden>
Subject: Re: [vile] comment leaders and reformatting
To: address@hidden
Cc: address@hidden
Message-ID: <address@hidden>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
On Sat, 5 Jun 2010, Paul Fox wrote:
thomas wrote:
A quick check seems to show this is working. I did
:describe-bindings
:bind-key cntl_a-prefix g
and the binding-list was updated (on the screen), and gf} formats a
paragraph.
(report bugs ;-)
:-) while i'm sure i/we tested that ability to rebind, it's
certainly been a while!
I can dimly recall it being tested...
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
------------------------------
_______________________________________________
vile mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/vile
End of vile Digest, Vol 53, Issue 1
***********************************