vile
[Top][All Lists]
Advanced

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

Re: [vile] Getting search result at top of screen - possible?


From: Thomas Dickey
Subject: Re: [vile] Getting search result at top of screen - possible?
Date: Wed, 14 Feb 2007 11:39:40 -0500 (EST)

On Wed, 14 Feb 2007, Eur Ing Chris Green wrote:

On Wed, Feb 14, 2007 at 10:40:57AM -0500, Thomas Dickey wrote:
On Wed, Feb 14, 2007 at 03:29:16PM +0000, Eur Ing Chris Green wrote:
Is it possible to get the result of a search in vile to appear at the
top of the screen rather than in the middle?

I am using vile as a file viewer looking for the start of the block
that I want to see by calling it as:-

    vile -s <string> <file>

but this means I have to scroll the page up a few lines to see as much
of the 'useful' text as I can with the <string> at the top.

You could write a macro - since last fall's changes, "-s" is just a
wrapper for one of vile's built-in commands.  Then inside the macro,
you can manipulate the view as you want.

That sounds like a reasonable way to do it, what command is "-s" a
wrapper for - or have I got hold of the wrong end of the stick?

That's search-forward (reading from the main.c patch in 9.5l).

I kept (barring bugs...) compatibility with the various options,
but mapped them into the internal command parsing rather than to
the lower-level functions that carry out the commands.  Then I
added the -c option (and extended "+") to allow "any" number of
commands to be passed.  That's the commands you'd put in a script -
so macros can also be referenced.

The reason for the command-line changes was so that I could pass
line- and column-numbers to a macro for wingrep.

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




reply via email to

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