Not logged in
Log in now
Create an account
Subscribe to LWN
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
PostgreSQL 9.3 beta: Federated databases and more
LWN.net Weekly Edition for May 9, 2013
Vim's newest features (Linux.com)
Posted Aug 30, 2005 19:36 UTC (Tue) by marduk (subscriber, #3831)
Posted Aug 30, 2005 20:24 UTC (Tue) by ncm (subscriber, #165)
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.
Posted Aug 30, 2005 22:01 UTC (Tue) by AnswerGuy (guest, #1256)
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.
Posted Aug 31, 2005 7:41 UTC (Wed) by zooko (subscriber, #2589)
Posted Aug 31, 2005 12:54 UTC (Wed) by rsidd (subscriber, #2582)
Posted Aug 31, 2005 18:35 UTC (Wed) by zblaxell (subscriber, #26385)
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. ;-)
vim vs. (original) vi, not vs. older versions of vim.
Posted Aug 30, 2005 20:59 UTC (Tue) by dwheeler (guest, #1216)
Which actually raises an interesting point. OpenOffice.org is still catching up to the feature list of Microsoft Office in some areas, such as its spreadsheet (though I find OOo Writer far more reliable than Office's Word for big documents). But here, the OSS/FS implementation (vim) has far surpassed the pay-for implementation (original vi), so much so that it's hard to believe anyone many people bother using or shipping the original one any more.
Posted Aug 30, 2005 21:09 UTC (Tue) by arcticwolf (guest, #8341)
Of course, the same thing could also be said about vi (and its newer versions such as vim) in general. ;) But I don't want to start a vi-vs.-emacs-vs.-everything-else flamewar, so I won't actually say that.
Posted Aug 30, 2005 21:42 UTC (Tue) by nix (subscriber, #2304)
(Many of these people also statically link the lot of them --- shock, it makes them larger --- and then run them on a box so large that it could run a hundred emacsen side-by-side without straining. Ridiculous.)
Posted Aug 31, 2005 13:37 UTC (Wed) by eru (subscriber, #2753)
Posted Aug 30, 2005 22:05 UTC (Tue) by rfunk (subscriber, #4054)
Posted Aug 30, 2005 23:13 UTC (Tue) by tjc (subscriber, #137)
I could take the time to figure out how to turn everything off, but it's a lot quicker to use nvi.
I used nvi for a while for the same reason, but I got tired of it "flashing" when I tried to scroll past the end of the buffer, so I finally dug around for vim configuration information. Adding
filetype off set noautoindent
to ~/.vimrc took care of my major complaints. This is with Debian; last time I used Redhat they had the whole "Christmas Tree" thing going, but that can be disabled as well.
Posted Aug 30, 2005 23:55 UTC (Tue) by parimi (subscriber, #5773)
Posted Aug 31, 2005 7:35 UTC (Wed) by philips (guest, #937)
Normally I end up recompiling vim since I use sometimes gvim and RH's gvim is just dumb [CENDORED] of [CENSORED], [CENSORED] and [CENSORED].
Most annoying features are text anti-aliasing and ridiculous GNOME integration, which kills bunch of standard vim shortcuts. I cannot imagine any sane person who can use that.
Recompilation helps. (Same goes for Solaris too.)
On SUSE and Debian, I found vim to be pretty okay - after few options tuned.
P.S. Most interesting thing, from another side of the fence, as I heard, hard-core Emacsers who use RH, normally insits on removing standard Emacs and using pacakges directly from GNU. Dunno why, but with all RH braindamages, I easily beleive that too.
Posted Aug 31, 2005 0:26 UTC (Wed) by ccyoung (guest, #16340)
You're right, need to do the :ai for indentation.
But accidental user modes are annoying: Sometimes it decides to start word wrapping. F1, being clumsily close to '2' gets pressed way too much. And frequently I'm asked about encrypting the doc and have no idea how I got there. And sometimes I work half an hour while recording a macro. All of these mysteries and more for someone too lazy for manual labor.
Posted Aug 31, 2005 0:55 UTC (Wed) by bronson (subscriber, #4806)
" F1 is too close to other keys. Besides, help is :help.
map <F1> <Nop>
map! <F1> <Nop>
How about Gnome's F1
Posted Aug 31, 2005 1:18 UTC (Wed) by kh (subscriber, #19413)
Posted Aug 31, 2005 7:44 UTC (Wed) by philips (guest, #937)
I have tried `God only knows how many` "better" xterms and in the end came back to basics - xterm itself. Other terminals are so much to graphics/GUI/bells/whistles/etc what makes them poor utilities. xterm just works and need very very few changes to configuration. Was at time first and only terminal to properly support UTF-8. Properly support reverse video. Has no GUI - so nothing stands in a way of job. And has most comprehensive text selection around.
man xterm - it is infinite source of knowledge, only comparable to vim's :help ;-)
xterm + bash + vim is what I use all the time.
P.S. Thou if you are on RH/Fedora Core, RedHat ships screwed xterm.ad. Replace it with standard one from XFree86/X.Org.
Posted Sep 1, 2005 18:17 UTC (Thu) by tjw.org (guest, #20716)
Has no GUI - so nothing stands in a way of job
Posted Aug 31, 2005 9:11 UTC (Wed) by micampe (guest, #4384)
Posted Aug 31, 2005 1:12 UTC (Wed) by spiv (subscriber, #9031)
And sometimes I work half an hour while recording a macro.
Encrypting the document
Posted Aug 31, 2005 21:22 UTC (Wed) by peace (guest, #10016)
(I do this all the time, and because I'm obviosly in a hurry, it's real annoying.)
Posted Aug 31, 2005 7:57 UTC (Wed) by joib (guest, #8541)
Yeah, I used to do something like that too. Emacs for programming and other "big" tasks, and vi for quick-and-dirty editing (config files etc.). However, at some point I got the idea that it's a waste of time to learn two editors, so nowadays I use a lightweight editor with emacs keybindings (zile) for quick-and-dirty stuff.
learning multiple editors
Posted Aug 31, 2005 13:42 UTC (Wed) by ecashin (subscriber, #12040)
So I'm glad to use vi and emacs, and to learn any other
good editor (like plan 9's acme), because learning how
other people work is a great way to grow. I'm convinced
that, far from wasting time, it leads to improvements in
Posted Aug 31, 2005 3:10 UTC (Wed) by drosser (guest, #29597)
Posted Aug 31, 2005 7:23 UTC (Wed) by Nickus (guest, #32179)
GNU is not Linux (only)
Posted Aug 31, 2005 17:51 UTC (Wed) by AnswerGuy (guest, #1256)
So, if you need the enhancements from GNU in your work and scripts
on $PROPRIETARY_UNIX then simply install the GNU suite on it.
(I routinely install the GNU tools suite on Solaris boxen when
I need to maintain them).
Posted Aug 31, 2005 18:52 UTC (Wed) by zblaxell (subscriber, #26385)
They're so nice to use that if you ever started using them, you'd start having unpleasant withdrawl symptoms whenever they're not available.
Due to legal reasons, they're just not available in many of the places where Solaris developers like to work, although enforcement is sometimes not very effective.
You can get hooked after the very first use.
If you're caught using them at work, you could face legal or disciplinary action, or even lose your job.
So it's not surprising that most Solaris developers Just Say No.
Posted Aug 31, 2005 23:56 UTC (Wed) by xoddam (subscriber, #2322)
Posted Sep 1, 2005 10:48 UTC (Thu) by janpla (guest, #11093)
No, but I AM surprised at how some people instinctively 'know' what is best for everybody.
So I assume you'd say 'vim' is better than the original vi? Let me tell you why I prefer the vi; it's very simple really. I work on many different UNIXes, and in the beginning when I used vim with all its bells and whistles it gave me all sorts of problems when I went to a platform without vim. So I started using vim in compatible mode, turned off all the stupid syntax highlighting etc, and learned to use it properly.
What I find surprising is how many things you can do in vi, and how well you can do them. The bells and whistles are simply irrelevant.
Posted Aug 31, 2005 9:26 UTC (Wed) by grmd (subscriber, #4391)
the OSS/FS implementation (vim) has far surpassed the pay-for implementation (original vi), so much so that it's hard to believe anyone many people bother using or shipping the original one any more.
I use this version because it is small. When I built it for my Gentoo systems, it didn't require the installation of any other packages, unlike the larger vi clones.
Posted Aug 31, 2005 11:29 UTC (Wed) by nurhussein (guest, #16226)
Posted Sep 1, 2005 0:41 UTC (Thu) by oki (guest, #19862)
Posted Sep 1, 2005 18:38 UTC (Thu) by tjw.org (guest, #20716)
Copyright © 2005, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds