[sf-lug] On some commandline text editors

Akkana Peck akkana at shallowsky.com
Sun Sep 1 18:00:41 PDT 2024


I'm bi -- I like both emacs and vi.

I use (GNU) emacs for any serious editing -- coding, writing articles, anything where I'm going to be working on the same file for hours at a time, and certainly anything where I care about syntax highlighting or smart auto-indent or features like that. I always have one emacs window running and I switch between buffers in it. It's an X11 emacs window, not emacs -nw in a terminal window, so that I can have better control over things like colors and fonts and mouse clicks, and, more rarely, embedded images. And I have a crazy amount of customizations built up over many years.

I use vim for:

- quick edits, like composing email in mutt: vim starts up faster than emacs

- hairy regexp global substitutes: although of course emacs also has regex replace, vi's modes mean that if I don't get the regular expression right the first time (as of course I won't), <colon><uparrow> brings it back so I can tweak it and try again. I've never found a way to do that in emacs.

- anything involving a slow connection: vi's screen drawing is much more efficient than emacs's. vi was even usable at 300 baud, back in the day.

- over ssh, or where I'm not using my own account so I don't have my .emacs

I'm not bothered by most of the annoyances you list for vim, and I do use a few vim enhancements like gqap to rewrap the current paragraph. But I agree very much about the default colors; when I started using vim rather than vi, the first thing I had to learn was :syntax off so it wouldn't colorize things invisible, until I had a few days to sit down and write a color scheme that actually worked against my preferred (light) background, since none of the standard schemes would.

        ...Akkana

Michael Paoli writes:
> My favorite, is "of course" vi,
> or more specifically in the land of Linux
> typically nvi - though for many distros it can be installed/configured
> as vi.
> Yeah, I find vim quite annoys me:
> https://www.mpaoli.net/~michael/linux/vim/vim_annoyances.txt
> ... though I can certainly do well enough with vim when/as needed.
> 
> And for folks looking to learn vi or other vi resources,
> may want to peek here:
> https://www.mpaoli.net/~michael/unix/vi/
> 
> I do also still quite like ed, and occasionally use it.  Similarly ex
> (which is actually same program as vi).  Most notably:
> ed is very light on resources and requirements,
> ed and ex will even run perfectly fine on your hardcopy or truly dumb
> terminal or generally if you don't have any proper TERM configuration
> set or available at all,
> and ed and ex are also very handy for easily self-documenting an edit
> session.  E.g. using script(1) to document something, want to document
> some edit changes that need to be done, use ed or ex and continue,
> all nicely documented.  E.g.:
> $ echo foo > file
> $ cat file
> foo
> $ ed file
> 4
> 1,$p
> foo
> 1
> foo
> s/foo/& bar baz/p
> foo bar baz
> a
> two
> three
> .
> g/two/s/two/2/p
> 2
> w
> 20
> q
> $ cat file
> foo bar baz
> 2
> three
> $
> And resources:
> $ cd /usr/bin && ls -iLno ed emacs ex nvi vi vim | sort -k 5,5bn -k 9,9
> 312514 -rwxr-xr-x 1 0   55744 Jan 15  2023 ed
> 312565 -rwxr-xr-x 3 0  472296 Oct 15  2022 ex
> 312565 -rwxr-xr-x 3 0  472296 Oct 15  2022 nvi
> 312565 -rwxr-xr-x 3 0  472296 Oct 15  2022 vi
> 312143 -rwxr-xr-x 1 0 3646968 May  4  2023 vim
> 313152 -rwxr-xr-x 1 0 6450472 Jun 24 21:54 emacs
> $
> And that's just the binary itself.
> $
> 
> On Sun, Sep 1, 2024 at 2:39 PM Alex Kleider <alexkleider at protonmail.com> wrote:
> >
> > My favourite is vim.  Perhaps "favourite" is the wrong word. It's the only one with the features I value _and_ within my capabilities to use.  (I'm typing this while in Canada so please don't be too critical of the extra "u":-)
> > Once installed, type "vimtutor" at the command line and you'll be moderately proficient at vim within an hour or so.
> > When I first discovered Linux I tried emacs but it was beyond me.
> > Many who program use IDE's to generate code but the command line with vim suits me best.
> > My opinion fwiw:-)
> >
> > Alex Kleider  (set from my current gizmo)
> >
> > On Sunday, September 1st, 2024 at 11:03 AM, aaronco36 at sdf.org <aaronco36 at sdf.org> wrote:
> > >
> > > Please feel free to discuss and reveal your/others' preferred text
> > > editors.
> > >
> > > -A
> > >
> > > [10]https://texteditors.org/cgi-bin/wiki.pl?Vi
> > > [11]https://texteditors.org/cgi-bin/wiki.pl?Nvi
> > > [12]https://texteditors.org/cgi-bin/wiki.pl?Vim
> > > [13]https://texteditors.org/cgi-bin/wiki.pl?Neovim
> > > [14]https://texteditors.org/cgi-bin/wiki.pl?GnuEmacs
> 
> _______________________________________________
> sf-lug mailing list
> sf-lug at linuxmafia.com
> http://linuxmafia.com/mailman/listinfo/sf-lug
> SF-LUG is at http://www.sf-lug.org/ 



More information about the sf-lug mailing list