|
|
Subscribe / Log in / New account

Vim's newest features (Linux.com)

Vim's newest features (Linux.com)

Posted Aug 30, 2005 19:36 UTC (Tue) by marduk (subscriber, #3831)
Parent article: Vim's newest features (Linux.com)

As one of the comments on the article say. None of those "new features" are new, and none of them require pluglins. Also, does the author mention anywhere which "new" version of vim he is reviewing? Perhaps he recently upgraded his Red Hat 4.2 box or something?


to post comments

Vim's newest features (Linux.com)

Posted Aug 30, 2005 20:24 UTC (Tue) by ncm (guest, #165) [Link] (4 responses)

Maybe he means "new" since Bill Joy released vi.

I have to admit I don't use many features beyond what was in the vi I learned in ... 1984? Let's see: multiple undo, "gq}" paragraph formatting, up-arrow for search- and command-line history retrieval, and arrow-key cursor motion. Oh, and it's nice when it goes back to the same spot you last edited in a file when you open it again. That's all. Maybe I should look again at what else it can do.

It's pretty annoying that Emacs's viper-mode copies nvi's multiple-undo semantics and not vim's. If I want the former, I can always use Emacs native undo, which is even more annoying.

Vim's newest features (Linux.com)

Posted Aug 30, 2005 22:01 UTC (Tue) by AnswerGuy (guest, #1256) [Link]

I've learned that the * and # commands (search forward or backward for
word under cursor) is pretty handy.

However, I do concur that this article was fluff and the content would
have easily been posted as a simple link to the top ten VIM scripts
and tips at vim.org.

JimD

Vim's newest features (Linux.com)

Posted Aug 31, 2005 7:41 UTC (Wed) by zooko (guest, #2589) [Link] (2 responses)

The trick in viper is to hit "u" to undo, and then to hit "." for the next undo. Once you get used to it it works just as well as vim's multilevel undo.

Vim's newest features (Linux.com)

Posted Aug 31, 2005 12:54 UTC (Wed) by rsidd (subscriber, #2582) [Link]

That's what ncm meant by "nvi semantics".

Vim's newest features (Linux.com)

Posted Aug 31, 2005 18:35 UTC (Wed) by zblaxell (subscriber, #26385) [Link]

I prefer nvi's use of the "u" key, which is compatible with other vi's (pressing 'u' twice takes you to the start of the last change). For short editing sessions nvi is similar enough to traditional vi's that I can use the traditional vi on other people's systems (at least as long as my window is less than 132 columns wide, the file contains no binary data, and various other limitations are avoided).

The other nice thing about nvi is that it doesn't leave the damn .swp files in random places on the filesystem, where they can e.g. be executed when the system crashes in the middle of editing an /etc file.

The thing that amazed me (until I had been using editors for a few years at least) is just how annoying it can be to have even trivial differences in behavior between editors. nvi has zillions of little implementation quirks (e.g. what happens when you press backspace at the beginning of an indented line?) which are different from vim and all the other vi clones. These quirks are critically important since I tend to edit files by typing commands into the editor and expecting the machine to do exactly as I specified. The feedback loop of looking at the screen to see what effect my commands are having cuts into my productivity, especially if there's any non-trivial delay in screen updates (e.g. editing files at remote sites or on busy machines).

It is certainly possible to configure most editors to one's liking and just copy the config files into one's home directory on any new machine one encounters; however, I have found that after a while I have zillions of little configuration files that I have to move around as a tarball. If I'm going to be unpacking a tarball on every new machine, it's not much more expensive to pack the source code for the various packages I use. So while I tend to use a lot of packages in their default configurations, I will insist on having specific packages.

I'm sure vim is a useful and worthwhile editor (I actually install nvi, vim, nano, kedit, emacs and half a dozen other text editors on all the machines I maintain at work as a courtesy to the users), but until it behaves exactly the same way as nvi, I'd never even consider using it. ;-)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds