Vim 7 Released
houseofmore writes "After many years of development, Bram Moolenaar, creator of Vim, today announced version 7 of the widely used editor. New features included spell checking in up to 50 languages, intelligent completion, tab pages, extended undo branches and much more. Downloads available here for Unix, Windows, Mac and more."
I know I will get flamed for this. Oh well, it's the truth. I'm sure there are a few others that would agree with me.
Meh.
I was a TA for a basic CS class for over a year. Upon first exposure the VIM (the editor that our system admins installed) many students got really frustrated. Most of them didn't understand how as they scrolled up on down with the mouse that random pieces of text got inserted all over their programs causing a tons of errors.
I too was pretty annoyed with VIM at first as that it is set up in such a way that it expects you to be a power user. I haven't downloaded the latest version but will do so shortly. But I would like to see a version of VIM that the everyday joe shmoe could use. Less clunky font, easier to set preferencess, and a way to turn of all those linux short cuts that we non-linux people are plagued with. I think there is a definate need for a more userfriendly version of VIM
yay.. spiffy new vim, vrs spiffy old vim..
though, the new features do look nice.
I actually know a guy with a ":wq" tattoo (on the back of his neck)
anime+manga together at last.. in real time.
Now I'm waiting for a vim-plugin for Firefox and Opera, just like the Konqueror guys did it. So I can finally spellcheck and syntaxcheck my slashdot comments... ;-)
The paradigm is different that most other editors. Most other editors use control keys (of some sort) for functions. Vi you enter into edit mode and type away, then leave edit mode and operate on your work. It is a different concept but it has its advantages. (For one: Except for capital letters I've never had to press two buttons at once, ever ... you escape to exit your edit mode and then it is all single key sequences to do what you want. Simple things but, for example, hitting the control button requires shifting your hand in an akward position wheras :w you don't have to move whatsoever ... )
I've never understood the attraction of Vim, maybe someone could explain. It seems like a throwback to keyboard command line editors with it's modal editing.
For my needs I either want a nice gui, in which case I will use kwrite, or bbedit, or some IDE.
or I want something simple from the commandline, in which case pico is almost useful, though I prefer emacs for that. I am not an emacs power user. All I can do is do primive searches, cut and paste. But that's really all I need for quick command line edits.
The other reason I like emacs and it's non-modal behaviour is that on a mac, those simple key bindings are available in every cocoa test window.
So why is Vim so popular?
Some drink at the fountain of knowledge. Others just gargle.
I find continually having to use the ESC key to be highly annoying. And really, to save a file, I don't really see CTRL-S being harder or slower to type than ESC :w
Meh.
speaking of vim, is there a way to fold all function definitions and leave the declarations and parameters intact in one go? i dont want to go to each starting { and 'zfap'.
I love vi, but I have always had a paste issue using vim. I typically use vim over ssh from a windows machine. I run into problems when I switch to insert mode and paste from (Windows) clipboard. Vim likes to insert a tab on every new line.
I end
up with text
that tends to format
like this.
It is very annoying and I end up either trying to find an old school vi binary or use pico or the old cat > foo.txt trick. Does anyone have any idea to stop the auto indent feature?
You jest, but VI made me hate all coding for about a day.
:wq, I'd messed up my entire Mercurial depository and had to reinstall and manually patch the whole damn project because I'd botched it. Frigging :wq...
I was trying to contribute to a project using Mercurial, when lo and behold! It dumped me into VIM.
Apparently, all I *really* was supposed to do here was enter a line of text describing my patch, save, and quit. But damned if I couldn't find a single menu to do that. The mouse was useless, and the menus were unnavigable.
By the time I figured out
1. Regular expressions even more powerfull than those in pearl .emacs file for years and Xemacs still felt awkward)
2. I can configure vim to my tastes from "out of the box" state in a couple of minutes (I was tewaking my
3. very, very powerfull and simple way to create macros and scripts
4. Absolutely magnificent documentation
5. fantastic mailing list where gurus and newbies are treated very, very well. I have seen Bram himself answer very simple beginers questions.
6. great site with hundreds of scripts, tips, and other useful stuff.
7. Bram has accepted several of my suggestions for improving some details in documentation and even suggestion for improvement of some code (a script for gunzipping files) ((It wasn't even proper patch, because I have never created patch file))
This feature (ctrl-n auto-complete)...You press ctrl-x ctrl-o to invoke it.
Now forgive my ignorance because I'm not a Vim user, but I thought (and what I keep hearing) is that vim is supposed to be better than emacs because it doesn't use complicated multi-key shortcuts using the control key etc. What happened? At this rate why not just use emacs with gnuclient (for fast access) and viper mode (for your basic vi keybindings)?
Jedidiah.
Craft Beer Programming T-shirts
I'm a fresh college grad breaking into the consulting business and the guys I work for insist that I learn vi for that exact reason. The example they gave me was: when you're sitting at a client's terminal with them breathing down your neck to make some simple changes, vi (or ed, but I won't go there) is simply the fastest way to do it, and when you do it fast enough it looks like magic to an inexperienced bystander. My preference is for the windowed editors like Crimson Editor or even Notepad, but I'm learning how important these "low level" tools can be.
- "Nobody came out that night, not one was ever seen. But Old Man Stauf is waiting there, crazy sick and mean!"
My first vi encounter was back in the days of the dinosaur. It was the later cretaceous, to be exact. At the time people used a wide variety of terminals to connect to the computer. The terminals themselves tended to be system specific, so that some had function keys, other didn't; some had arrow keys, others didn't; and some had meta keys, while others didn't. Using such a variety of terminals for Unix was a major problem, ranking up there with the problem of using a huge variety of printers. But then came vi and it didn't need function keys, arrow keys or meta keys. I could finally have a full screen text editor on ANY terminal I chose. With a tiny handful of commands I could be productive. In comparison to the other editors, it was easy to use. At the time vi was a huge step forward.
Modern interfaces with mice and menus and toolbars may have made vi somewhat obsolete, but I would still rather write software using vi than with <hack> MSWord...
p.s. The problem with emacs was that it requried two meta keys, which weren't always available, and even if they were, may be in different keyboard locations under different names. It also required chording which slows down typing (especially if you weren't sure where the meta keys were on this keyboard). And as other people have pointed at, at the time you were guaranteed that vi would be available on any Unix system, while access to emacs was hit or miss.
A Government Is a Body of People, Usually Notably Ungoverned
IIRC, the presence of vi and ex are part of required compliance for POSIX and the Single UNIX Specification. So, it is not just there by convention or convenience, but is a requirement for guaranteed inter-operaability, along with ed, sed, and awk. Or does POSIX simply define the behavior of those tools and not require their presence?
Ever since I found notepad++ http://notepad-plus.sourceforge.net/, I have never looked at another editor.
then i submit..
Also..
"GUIs + Keyboard Shortcuts are your friend"
The ammount of keyboard shortcuts in VI will eat your fucking GUI editor for lunch.
I'm against picketing, but I don't know how to show it.
vim is the program that I use most. I used to code mostly shell stuff as a sysadmin and RAD niche programs: bash, perl, python, ruby... I always use vim for that. I also use vim for html, css, javascript, latex, and plain-ol' writing any kind of text.
These days I've been using eclipse a lot in emacs mode because my current job requires lots of java coding of a program with a huge code base, and my wrists are starting to hurt. Seriously, emacs is also good (IMHO not as fast as vim if you know both really well -- I use emacs mode in bash and know it pretty durn well too), but the weird stretches that you do in emacs will give you serious hand and wrist problems from awkward repetitive hand movements.
The other reason I prefer vim is that I REALLY LIKE having an editing mode separate from an insert mode. I like using vim to navigate through my code without worrying that I'll accidentally delete a character or make a typo. I actually do that all the time when I use emacs mode in eclipse, and then I have to undo my changes (but sometimes it takes a second to figure out which was the last intentional change).
With vim I can navigate through my file with little worry that I'll mess anything up.
And vim is FAR superior to old vi!!! Syntax-highlighting, word completion (C-n, C-p, dictionary completion, file completion...)
Emacs may be somewhat more powerful/extensible, and I believe it's quite good for coding in C/C++ and integrating with build tools -- a wonderful editor and environment. But for shear editing speed I think NOTHING can beat vim.
Can someone tell me how easy is it to extend vi/vim? I know it's in the manual and all that, but this is a question about the workflow. Can I define a function to be called anytime I want in vi/vim? In Emacs, it's quite trivial:
C-x b ...
That's control-x b, to change buffer
*scratch*
... to change to scratch (as in scratchpad)
(defun blah (arglist) (interactive) (...)) ... is the required action - it's just code.
just type away the function,
C-x C-e
evaluate last-sexp. No need to compile. No need to make or whatnot.
To run it now,
M-x blah
That's it. That takes no effort at all. This can be bound to a key by M-x local-set-key (tab completion is your friend here). For frequently used functions, save it in ~/.emacs
Or alternatively,
C-x (
to start defining a keyboard macro.
type your commands here, put some thought into this, could be tricky
C-x )
end keyboard macro
C-x e
Execute keyboard macro, subsequent e to repeat keystroke sequence.
To name the macro,
M-x name-last-kbd-macro (or somesuch, check manual for your specific version), it now looks just like a function. Can be saved, edited, etc by:
M-x edit-kbd-macro
or M-x insert-kbd-macro
Too easy...
I've heard of users coming up with a Java bytecode disassembler in under 20 minutes using these methods...see here
Newer versions of Emacs has macro rings for storing multiple macros or whatnot. I know vim has numbered keyboard macros, seems slightly better, but I cannot judge until I've tried it.
How about vi/vim?
I had the pleasure to meet Bram several years back at Linux Expo NY 1999. The man is truly a unique individual. While the majority of Linux geeks (especially the Slashdot crew, who tended to through things at their audience and just act goofy) clowned around a great deal, everyone bragging about thier accomplishments, and of course everyone bragging about all their stocks and options, Bram was very down to earth. This is a man that has legitimately made a tremendous impact on the UNIX world.
:make
There is a fairly funny story about Bram, we were sitting at the hotel, waiting for a Taxi or something, having a nice discussion about the evolution of Unix (I think, could have been that I was asking him about the Netherlands, who knows, doesn't matter in this context) and this gentleman, a man that I would have otherwise considered a fish out of water in my home town of NYC, performed an amazingly interesting feat.
There was a man sitting at the bar behind the bench we were sitting on. He had left his overcoat resting on the railing surrounding the bar. Another man came in off the street. He didn't look particularly unusual, maybe a little dirty for someone that belonged in a $300 a night hotel, but construction workers have conventions to, so why not, right? The man from the street stood next to the bench minding his own business as my conversation with Bram progressed, and then out of nowhere, Bram's arm flyed past my head and I found this other man nearly falling on me.
What had happened was the man from the street began to walk off as if he was heading to a Taxi himself and in the process had tried to take possession of the overcoat of the man at the bar when he wasn't looking. Bram had stopped the thief in the act and after the whole occurance was over, the hotel guard was resolving the issue and the man at the bar was brushing his jacket off and leaving his mouth gaping, Bram sat down and we continued our conversation as if nothing had ever happened.
Well, it's an interesting story to me at least. Sadly, it really takes a foreigner in NYC to be honest enough to go out on a limb to stop a thief. But the man with the overcoat should be thankful I hope.
Anyway, Bram, I don't typically talk about where I come from in this board, I like the minimal anonyminity that you're allowed as a logged in poster. But it's good to hear you're back in action. I'd also like to express the considerable pain and suffering I survived having ported a 1.2million line application to QNX using your VIM, I can at least say thanks for
Good luck with future versions, send me a private message if you'd like. It would be good to hear from you again.