[dev] Re: ed, vi, vim and EOLs via ff+ffs

From: Sven Guckes <maillist-wmi-announce_AT_guckes.net>
Date: Fri, 6 Nov 2009 10:22:07 +0100

* Uriel <lost.goblin_AT_gmail.com> [2009-11-05 10:36]:
> I use ed almost every day, it is by far the
> fastest way to to small edits, by the time vi
> starts up, I have typed /foo\n c\n bar\n .\n wq\n

you can type these commands while vi starts up?
all within half a second or less? respect!
(does that "vi" gui really slow down
 the startup that much? hmm...)

> Plus as others have noted it can be scripted.

same holds for vim, by the way: vim -s scriptfile

> And here is the thing about ed, I know (or used to
> anyway) every command and feature inside-out by heart,
> while *nobody* knows what 1% of the vim options do!

vim has about 400 options. i claim to know a dozen
which is clearly about one percent. so you're wrong. :-P

> Recently I was stuck on windows with a improperly built
> vim that was using DOS line endings by default, it was
> fucking hell to figure out that the right option to
> solve the problem was to use the *ffs* setting!

well.. if you can make an educated guess about "line
endings" then you can test the help command with it:

    :help format[CTRL-D]
    :help line[CTRL-D

yes, the ":help" command is probably quite fancy and does
not go well with purists who prefer reading the source code.

> There are about a dozen slightly different flags all of
> which affect how line endings are set! For Fucks Sake!

you can choose "ff" to be either "dos", "mac" or "unix" -
and "ffs" to be a list of these to try when reading a file.

yes, it's all very complicated.
vim clearly isnt for you then. ;-)

good luck in finding an editor which understands
DOS/Mac/Unix EOLs and is yet easier to configure. :-)


Differences between Vi and Vim in a nutshell:
help system; long line support, multi-language support (utf-8),
multi-platform, multi level undo+redo, command line editing+history;
completion for command line + insert mode, text formatting, extended
search patterns; multiple buffers and windows; automatic commands,
folding, scripting and expressions, syntax coloring/highlighting,
visual mode + block operators, macro recording, plugins, directory,
remote and archive browsing, edit-compile speedup, :vimgrep +
cindent (improved indenting), search for words in included files,
diff mode, spell checking, viminfo; gui (gvim), support for mouse +
printing, cursor beyond end-of-lines, editing of binary files.
Received on Fri Nov 06 2009 - 09:22:07 UTC

This archive was generated by hypermail 2.2.0 : Fri Nov 06 2009 - 09:24:03 UTC