vile
[Top][All Lists]
Advanced

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

Re: [vile] Some issues/features


From: Thomas Dickey
Subject: Re: [vile] Some issues/features
Date: Wed, 29 Sep 2010 05:17:16 -0400 (EDT)

On Wed, 29 Sep 2010, Paul van Tilburg wrote:

Hi,

I have some issues/ideas I wanted to share.  If you want me to file bug
reports about it, I am happy to.  But maybe discussing a bit first is
better.

1. Reformatting in bulleted lists.

I often write a paragraph for some list item as follows:

 * This is a nice piece of text in a bulleted list
   and this is the next line and there is even more
   on the next line but that doesn't really matter.

But when I try to reformat the region using ^A-f, I get:

 * This is a nice piece of text in a bulleted list and this is the next
   * line and there is even more on the next line but that doesn't
   * really matter.

Offhand, I'd think the place to tweak this is here:

   comment-prefix=^\s*\(\(\s*[#*>]\)\|\(///*\)\)\+

The relevant chunk of code seems to be the first part of this:

        if ((plength = comment_prefix()) >= 0) {
            is_comment = TRUE;
            tb_bappend(cp,
                       lvalue(DOT.l) + DOT.o,
                       (size_t) (plength - DOT.o));
        } else if (cplus_comment_start(c)) {
            is_comment = TRUE;
            tb_bappend(cp, "//", (size_t) 2);
        } else if (c_comment_start(c)) {
            is_comment = TRUE;
            tb_bappend(cp, "*", (size_t) 1);
        }

Essentially what it's trying to do is to replicate the part of the previous line that matches the comment-prefix pattern onto the next
line.  The other two parts of the chunk could be improved by adding
modes to enable/disable those.

This is not really what I want.  The help explains that it tries to do
the "right" thing, but since I'm not doing any C-code here, it's doing
the wrong thing.  Is there something wrong with my settings?  Even if it
would be the "right" thing for C", should it format it as follows?

 * This is a nice piece of text in a bulleted list and this is the next
 * line and there is even more on the next line but that doesn't
 * really matter.

2. The wrapmargin/fillcol settings.

I usually set wrapmargin to -80 and have word wrapping enabled as to not
exceed the 80-col convention while inserting text.  Sometimes
post-reformating is very useful, so I've tried setting fillcol=75 (and
72 for mail).  However, when you then type 80col-wrapped text and then
later reformat, the text changes, while it should be idempotent.
Because the help info suggestes that using both is not a wise idea, I
tried setting wrapmargin=-80 and fillcol=0 but than something weird
happens.  If I open a file and take the following sentence:

 This is some sentence that is supposed to be longer than 75 characters
 to illustrate my example.

and I reformat it, I get a

 This is some sentence that is supposed to be longer than 75 characters to kind 
of ilillustrate my example.

which puzzles me?

I'm puzzled here - sounds as if the line is not being wrapped in the result.

3. Text format flowed/fixed

This is mainly inspired by RFC 2646.
Mostly, I write text in a fixed format.  A paragraph contains of several
lines that fill 80 columns maximum (preferably 75) each and is ended
with an empty line (2 times LF).  This works for example great for
LaTeX.  However, I sometimes coauthor a document with someone who uses
the flowed format.  This means a paragraph is a long line that is not
wrapped and ended with LF (or CRLF).

yes - this was something that I intended looking at - and 9.8's out,
so it would be nice to start working on this feature. That, and working on a different X driver were my current plan.

The fixed format case is well-suported in vile through wrapword,
wrapmargin and fillcol.  Now, to deal with the flowed format case, I can
disable word wrapping and enable linewrap, however it's rarther
ugly/unusable because linewrap cuts in the middle of words and you
cannot set the right margin.  It would be great if vile could support
this mode of editing as well.  I'm not sure what is exactly needed to
make this work; I guess some setting for the linewrap margin and an
online wordwrap algorithm.  Also, I wouldn't know what region
reformatting (^A-f) should do in this case.  Any ideas?

Thank you for your time.

Kind regards,
Paul

--
PhD Student @ Eindhoven                     | email: address@hidden
University of Technology, The Netherlands   | JID: address@hidden
Using the Power of Debian GNU/Linux <<< | GnuPG key ID: 0x50064181

_______________________________________________
vile mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/vile


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



reply via email to

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