[Gllug] ed vs emacs/vi, was: ed vs emacs, was: OpenMoko Neo Freerunner

damion.yates at gmail.com damion.yates at gmail.com
Sat May 16 15:29:58 UTC 2009


On Fri, 15 May 2009, general_email at technicalbloke.com wrote:

> Pish, I quite commonly need to pull chunks out of the middle of a line
> and other seemingly random places. What I pretty much _never_need to
> do is select exactly 14 words, and if I do need the text between
> column 27 and 65 on the line 13 lines above the cursor it's a lot
> faster for me to use the mouse than the keyboard if only because it
> spares me the counting!

You still don't seem to have understood what we've been explaining.
There is no counting, 13k027l65y7 is much faster to type.  You want 13
lines you type 13k, not press <Up> 13 times, if you want the line at the
start of a paragraph you press {.

If you actually do want random selections, you can pick random values
for the N in yNw from cursor position.

More normally you want a word in a paragraph or function (if
programming) so operations like /for^My$ or $y% or f(yf) are used, to
select and copy in to the cut buffer:

everything from for onwards in the line
everything between curley braces in a function
everything including brackets on a line.
 
> Indeed I get the impression that most people here use the GUI versions
> whenever they're practical so people _aren't_ generally choosing
> terminal based editors over GUI ones except for practical purposes.
> That makes sense to me now (but please feel free to correct me if any
> of you do _actually_ prefer the terminal version!).

I do not, there is nothing gained from a few menus and icons, all of
which I know equivalent operations in command mode in vi.  I do, on the
other hand, use the mouse sometimes to select things from within the
single xterm and screen session, to paste in to other applications like
filenames for xv, or urls in to Xmosaic.
 
> The other point I was trying to make is that, for the day to day stuff
> most people need an editor for there's nothing wrong with nano
> (although shift-select wouldn't hurt). Before this year the last time
> I used Unix with any regularity was on HP-UX workstations in 1994 and
> I remember pico as being far easier than anything else for my modest
> needs. I think this is still the case.

Whilst I accept, you could muddle your way through system admin and
general unix diagnostics and support with very basic editors, I would be
very worried by somebody prefering to find ways to use a gui (start X,
use port forwardng, copy file locally or export a filesytem like sshfs).
Especially as ed and vi come on just about every system you can imagine
and there is a trivial mode of operation you can learn.  Move with
cursors in command mode, press i where you want to type, escape to go
back to moving around and :wq! to save, or :q! to quit without saving.
If you want to get really advanced, x in command mode acts like Del
(suck chars in to cursor) and dd deletes lines.  I think that just about
covers everything you'll need and is almost equivalent to the full power
of pico but without the file corruption.

At uni over a decade ago, I wrote vi macros to make vim act almost
exactly like pico, right down to the annoying realestate take with help
keys at the bottom.  An alias called pico which envoked vim with the
right macro file and started it in insert mode made it an almost
transparent drop in replacement.  This can probably be found on a
comp.editors archive.

Damion
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list