Vim's newest features (Linux.com)
Vim's newest features (Linux.com)
Posted Aug 31, 2005 7:41 UTC (Wed) by zooko (guest, #2589)In reply to: Vim's newest features (Linux.com) by ncm
Parent article: Vim's newest features (Linux.com)
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.
Posted Aug 31, 2005 12:54 UTC (Wed)
by rsidd (subscriber, #2582)
[Link]
Posted Aug 31, 2005 18:35 UTC (Wed)
by zblaxell (subscriber, #26385)
[Link]
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. ;-)
That's what ncm meant by "nvi semantics".Vim's newest features (Linux.com)
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).Vim's newest features (Linux.com)