[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] Rectangular fiddling
From: |
Thomas Dickey |
Subject: |
Re: [vile] Rectangular fiddling |
Date: |
Tue, 14 Aug 2007 06:42:57 -0400 (EDT) |
On Tue, 14 Aug 2007, Paul van Tilburg wrote:
Hello all,
This week I discovered that vile could do more with rectangular
selections than I had previously assumed. Seeing vim-users doing all
kind of useful tricks, I investigated what vile could do. I have some
observations and I am interested in your thoughts about them.
* If one uses `c' followed by a rectangular selection, vile queries for
a string to fill it with. If the string is shorter than the width
of the selection, the rest is filled with NULL-chars instead of
spaces. Is this a feature or a bug?
I assume it's a bug (I recall that it's supposed to fill with spaces).
* It would be useful to be able to prefix a rectagular selection
or postfix it similar to `A' and `I' for one line.
I was looking at:
http://jvi.sourceforge.net/javahelpset/jvi-vis_block.html
and saw that vile could do most of it too, except I couldn't find how
I could prefix/postfix.
I can see what's involved in implementing it (at the moment unsure of the
ease of implementation).
By analogy with ^A-p, which is one of the calls on doput() - see
rectputafter in cmdtbl and line.c, the insert/append stuff is implemented
by ins_n_times(). But the latter may not work with regions (I don't see
any sign of it in insert.c where I'd expect, so I assume it does not).
If it did, then adding predefined bindings is easy.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net