more (or less) vi

When using the more tool (this works with less, also, and less is generally more useful; you can scroll backwards and forwards with less), you can press “v” to start editing the file, in vi, at the line you are currently viewing.

This works on Linux and Solaris; please confirm on other OSes as appropriate, though I would assume that what works on more on Solaris, will work on more or less on just about any OS.

This makes using more or less far more powerful than before, and a new way into vi.

About these ads

One Response to more (or less) vi

  1. kamper says:

    $ uname -sr
    OpenBSD 4.3
    $ ls -i /usr/bin/{more,less}
    433116 /usr/bin/less* 433116 /usr/bin/more*
    $ less –version | head -1
    less 382
    —-
    $ uname -sr
    Darwin 8.11.0
    $ ls -i /usr/bin/{more,less}
    30174 /usr/bin/less* 30174 /usr/bin/more*
    $ less –version | head -1
    less 382

    Both work as described. It all comes from more or less the same place, so I would expect no less on any recent operating system.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: