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

general_email at technicalbloke.com general_email at technicalbloke.com
Sat May 16 18:49:43 UTC 2009


damion.yates at gmail.com wrote:
> 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 {.
>   
Likewise. What I meant was "how do I know what those numbers are in the
first place without counting?", 13k027l65y7 is indeed much faster to
type IF you know those numbers, if you don't then hitting up as many
times as it takes or simply clicking would be faster than figuring them
out. Now having said that, the more I learn about vim the more impressed
I am at the range of selection options it gives so there's no doubt some
better way of achieving  the intended ends. The question I suppose boils
down to whether it's worth the learning curve to attain such ninja
skills. I suspect no for your average desktop user, and yes for a full
time programmer - I'm a part time programmer so it's a maybe for me.

>  
>   
>> Indeed I get the impression that most people here use the GUI versions
>> <snip>
>>     
>
> I do not, there is nothing gained from a few menus and icons, all of
> <snip> 
>   
I stand corrected then.


>> 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).
>   
Well it's not the 80s anymore and I'd far rather use a gui if one were
available. I mean, it's perfectly possible to manage all the files on
your system from the command line but, call me a heretic, I'd rather use
Nautilus or Thunar if it's at all practical. I appreciate there is some
value in knowing the  bare bones way of doing things and I _have_ taken
the time to learn basic command line file management so I can try and
fix X if I bork it, script stuff  and interact with arbitrary web
hosting accounts via SSH but, given the choice I'd far prefer to have
all the pretty icons, drag and drop and context menus etc. Also,
assuming half decent bandwidth, I can see nothing wrong with using sshfs
to mount a filesystem I use regularly (within a virtual admin machine
even!) on my local X-windowed system and not have to touch a command
line for months on end.

Like most n00bs the extent of my 'system administration' ambitions are
the simple day to day maintenance of one or two local machines, maybe
the administration of a VPS web/mail server and maybe the provision of
remote access to my main desktop machine from my laptop. I don't think
any of that really requires the power of Emacs of Vim.



> 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.
>
>   
Nice micro tutorial although you missed out copy and paste ;) Something
like that on the screen the first time you start vim up might save new
people some pain, especially if they can't get online and they only have
vim-tiny and no docs as is the default in my distro. If I ever suspect I
might encounter a machine without a GUI editor or nano/pico available I
will make a point of practising my vi basics, in reality though I don't
think that's going to happen any time soon... They're there as standard
on most desktop distros and any machines I can remote into that don't
have them, almost by definition, will have the connectivity I need to
install them. Naturally your use-case may vary but I suspect mine will
become more common over the next few years, if it isn't already.

As for file corruption in nano it is my understanding that most distros
have it set to -nowrap when it is run as root, although I concede it
should probably default to run that way all the time.


> 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
>   

Cool, so did you write that for your own use because you liked pico or
because so many other people were struggling with vi?

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




More information about the GLLUG mailing list