[Ilugc] One Day One GNU/Linux Command (MORE)

  • From: kapil@xxxxxxxxxxx (Kapil Hari Paranjape)
  • Date: Wed Jun 4 09:22:57 2008

Hello,

On Tue, 03 Jun 2008, Balu manyam wrote:

absolutely - less is much better - it would be more helpful if one can edit
a file with less - so we need not use 'vi' especially for big text
files..(sed -i is an option but less is less memory intensive)

I think adding an editor to "less" would lead to un-needed bloat.
Having one's own familiar editor while editing files is a great boon.
Each application with its own quirky and un-familiar editor is a
pain.

Here are some alternatives:

 1. Use the 'v' command in "less" to push the file to *real* editor.
 You can use the emacs server mode so that the editing task is pushed
 to an already running emacs. 

 2. Reverse things and use the 'view-file' mode of your editor to view
 the file instead of less. For example, in vi-like editors you can use
 the view command. In emacs you can set the buffer to read-only or
 use a mode that runs a viewer like w3m inside emacs. I think "vim"
 has a less emulation mode as well.

Regards,

Kapil.
--

Other related posts: