Slashdot Log In
Vim 7 Released
Posted by
Hemos
on Mon May 08, 2006 11:58 AM
from the time-to-get-your-upgrade-on dept.
from the time-to-get-your-upgrade-on dept.
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."
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
waiting (Score:5, Funny)
I'm waiting for the emacs emulation mode. (kidding, kidding)
Re:waiting (Score:5, Funny)
Creating a macro is left as an exercise to the reader.
^X^S
dammit
Parent
Re:waiting (Score:3, Funny)
Vim now runs on more than 15 [vim.org] different operating systems, so I'm sure emacs can't be far behind.
Re:waiting (Score:4, Interesting)
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?
Parent
Re:waiting (Score:3, Insightful)
Re:waiting (Score:4, Informative)
Parent
Re:waiting (Score:4, Informative)
This is an effective little program for learning basic vi/vim.
Parent
Re:waiting (Score:5, Funny)
Nope. What can you tell me about it?
Parent
Re:waiting (Score:5, Informative)
It's especially handy for editing source code. Where you have commands to reformat comments, move between functions, jump to definitions and things like that. I'd rather hit [[ to go to the top of the previous function than have to enter a search for it. This is especially useful when you're going through all your callback routines and adding a little bit of code to them.
The ability to have multiple cut/paste buffers is also nice. The modal behavior makes people think Vi is a throwback, but honestly only a handful of editors are able to provide even 90% of Vi's editing features. And none (not even emacs) can do it with so few keystrokes (that does make the learning curve on Vi rather steep).
The disadvantage to such an effecient input system is when the cat jumps on your keyboard, you can have hours of work erased in Vi.
ps- I have vi-like bindings in my Cocoa windows. you can actually change how the input works and plug in something else. Or you can just tweak it to use Ctrl-vi key without even using a plugin by editing DefaultKeyBinding.dict. The emacs bindings that are there by default are pretty weak anyways.
Parent
Re:waiting (Score:5, Informative)
I'll bite. A little enlightenment on vim can't hurt.
instead of being able to undo the undo you just accidentally undid
Well, almost every text editor and word processor in the world has this. The command for 'redo' (undo the undone) is :red or CTRL+R.
vim can be a real surprise when it drops you somewhere into the middle of a file
set viminfo='0 in .vimrc.
And colorized editing!?!
I'd appreciate a "strict vi mode" command
vim -v
Parent
Re:waiting (Score:4, Informative)
Ctrl-R to undo undos
Plus, if you count on being able to know where you will start editing a file, vim can be a real surprise when it drops you somewhere into the middle of a file instead of row 1 column 1. If you've not edited that file for months, it is ridiculous for vim to assume that you want to go back to the last place you were.
Put "autocmd BufRead normal gg" in your .vimrc
And colorized editing!?! What a treat for text to show up as dark blue on black when you've set your xterm colors to white on black.
I'd appreciate a "strict vi mode" command to tell vim not to do all the extra stuff that gets in the way of fingers that learned vi a long time ago.
You're welcome :).
Parent
Re:waiting (Score:5, Informative)
Now, if I were to start fresh, would I still choose vim? I think the answer is a resounding "probably." Here are some reasons why:
vi[m]'s ubiquity I think is its strongest argument. Other editors exist to satisfy the other requirements, and some of them might even do it in less obscure ways. But if you're the type who needs to bounce around on different systems running different unixes, vi is always just there. And once you become proficient enough, you're really not strongly inclined to use anything else.
Parent
Re:waiting (Score:5, Informative)
Parent
Re:waiting (Score:4, Insightful)
Parent
Re:waiting (Score:4, Informative)
I'll admit the initial learning curve is a pain, but once you've mastered the basic cursor movement/find/save set of commands, vi has an easy learning curve. You can use the basic command set for years and add one or two new commands as you need ("There has to be an easier way to do this..." [reaches for vi reference]).
Efficiency is the main reason, but there are many others. Black backgrounds are easier on my eyeballs; syntax highlighting keeps me from making stupid mistakes; it's on every UNIX box by default; and I've been using it for 17 years -- muscle memory is a good thing.
Parent
syntax highlighting! (Score:5, Funny)
Re:syntax highlighting! (Score:5, Funny)
Dude, you could edit /dev/kmem and vim would somehow figure out syntax highlighting for it.
Parent
What's that odor ? (Score:3, Funny)
Vim 7 (Score:3, Funny)
This alone is worth it... (Score:5, Funny)
Yup, this one alone is worth it. Need to write some code? Forget your IDE and just use the C "autoprogram" feature of the new Vi. This message was composed with
Re:Ahhhhh.... (Score:5, Informative)
From what I'm reading in the vim7 docs, what *is* new is "omni completion". You press ctrl-x ctrl-o to invoke it. But when I tried that on a Python file with vim 7 installed from their Windows binary, I got "Error. Required vim compiled with +python."
Parent
Let's try it out (Score:5, Funny)
q
stop
exit
[esc]
quit damnit
ahhhhh
(just kidding, I know how to quit from vim)
Re:Let's try it out (Score:5, Funny)
alt-q
alt-F4
ctrl-c
ctrl-d
esc-esc-esc-esc
awww, screwit...
*power button*
Parent
Spell Check (Score:4, Funny)
vim 8 will do email (Score:4, Informative)
I just can't get the hang of vim (Score:5, Interesting)
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.
slightly different paradigm (Score:5, Interesting)
Parent
Re:slightly different paradigm (Score:4, Interesting)
That's sad, because someone who truly knows how to get the most out of Emacs can be very impressive. Most of the people I know don't really know how to use vi. Sure they can do i for insert, and dd for delete line and so forth, but they hardly use the full feature set. Of course I have witnessed a few people who really know how to use vi, and that is something to behold. A real Emacs user is no different. Just because you haven't met one doesn't mean they don't exist (I've met many myself).
Jedidiah.
Parent
Re:I just can't get the hang of vim (Score:3, Informative)
Vi is simple, elegant, and light-weight. It takes only a few minutes to learn, but years to truly master. Vim is a misguided attempt to add the bloat of emacs to v
Re:I just can't get the hang of vim (Score:4, Funny)
Said with a straight face too, I'm sure. Only on slashdot!
Parent
Re:I just can't get the hang of vim (Score:3, Interesting)
You just can't do stuff like:
Delete ^M DOS returns -
Turn ^M into "real" returns -
with Joe.
More VIM tricks [rayninfo.co.uk].
Then there's block editing (quickly comment out sections of code), recording, complete access to all commands (including navigation) from the homerow of the keyboard, etc.
Re:On OS X, it's all about SubEthaEdit (Score:4, Funny)
Parent
My history with VIM (Score:4, Interesting)
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
Re:My history with VIM (Score:5, Insightful)
Parent
vim plugins (Score:3, Interesting)
Cut and Paste? (Score:3, Insightful)
I have always been unhappy with yank-number of lines
or marking, etc.
Re:Cut and Paste? (Score:5, Informative)
That should fix that problem, but it has some other weirdnesses. So, once you're done pasting set it back to nopaste:
You could probably map that to a shortcut if you wanted to make it quicker. I don't need it that often, so I haven't bothered.
Parent
My favorite editor (Score:5, Funny)
made with vi [dimspace.com]
And shockingly enough... (Score:5, Funny)
Parent
Re:And shockingly enough... (Score:5, Funny)
Parent
Version 7? (Score:5, Funny)
Re:Version 7? (Score:5, Funny)
I had heard they dropped the major version number, but I always presumed it was 0.21.4, with the expectation that Emacs would finally hit 1.0.0 once it was feature complete.
Jedidiah.
Parent
I 3 VIM (Score:5, Informative)
After sitting through a presentation of a heuristic analysis of VIM in one of my HCI classes, where VIM was ridiculed for being the most un-intuitive, un-user friendly pieces of software since MS-DOS, I never thought I'd find myself using this tool... and actually LOVING it.
Well... fast forward a few months... I got fed up with nano's lack of a search-and-replace feature, and didn't feel like learning awk or sed. I finally decided to give vim a serious try. The key was finding this [eriogerg.free.fr] cheat sheet.
Now I love it... I'm cw'ing, y'anking, dd'ing away. Mind you I still prefer Eclipse for full-fledged development, but there's nothign like super quick and efficient scripting with vim.
Learn it. It's worth it.
Another Cheat Sheet (Score:4, Informative)
Parent
My knowledge of vim... (Score:4, Informative)
Right slash to search
Period to repeat a command
I to insert at the beginning of the line, i to insert at the cursor
yy to copy a line, 5yy to copy 5 lines
dd to delete a line
cw to change a word
ma and y'a or ma and d'a to delete or copy a block
p to paste
u for undo
x to delete a character
% to find a closing bracket or parenthesis
That's really all I've ever learned or needed. It's a pretty small subset (and getting smaller with each release), but I get by on it!
Re:No Mac Version 7 (Score:5, Informative)
http://macvim.org/OSX/index.php [macvim.org]
Parent
Re:Vim mean... (Score:4, Insightful)
Typing with two fingers is simpler than trying to remember which of the "correct" fingers go on which keys. But take the time to learn it properly and you can type far faster than you ever did before, even if there's a temporary drop in speed while you learn.
It's the same with Vi. Even if you don't learn everything that it can do, the simple fact that I can do all the major operations without having to use a bloody mouse is a plus for a touch-typist like myself. Vi is very small, very quick and very powerful. The learning curve is worth it.
Parent
You mean ed users (Score:5, Funny)
Message-ID:
Sender: news@athena.mit.edu (News system)
Subject: The True Path (long)
Date: 11 Jul 91 03:17:31 GMT
Path: ai-lab!mintaka!olivea!samsung!zaphod.mps.ohio-sta
Newsgroups: alt.religion.emacs,alt.slack
Organization: Massachusetts Institute of Technology
Lines: 95
Xref: ai-lab alt.religion.emacs:244 alt.slack:1935
When I log into my Xenix system with my 110 baud teletype, both vi *and* Emacs are just too damn slow. They print useless messages like, 'C-h for help' and '"foo" File is read only'. So I use the editor that doesn't waste my VALUABLE time.
Ed, man! !man ed
ED(1) UNIX Programmer's Manual ED(1)
NAME
ed - text editor
SYNOPSIS
ed [ - ] [ -x ] [ name ]
DESCRIPTION
Ed is the standard text editor.
---
Computer Scientists love ed, not just because it comes first alphabetically, but because it's the standard. Everyone else loves ed because it's ED!
"Ed is the standard text editor."
And ed doesn't waste space on my Timex Sinclair. Just look:
-rwxr-xr-x 1 root 24 Oct 29 1929
-rwxr-xr-t 4 root 1310720 Jan 1 1970
-rwxr-xr-x 1 root 5.89824e37 Oct 22 1990
Of course, on the system *I* administrate, vi is symlinked to ed. Emacs has been replaced by a shell script which 1) Generates a syslog message at level LOG_EMERG; 2) reduces the user's disk quota by 100K; and 3) RUNS ED!!!!!!
"Ed is the standard text editor."
Let's look at a typical novice's session with the mighty ed:
golem> ed
?
help
?
quit
?
exit
?
bye
?
hello?
?
eat flaming death
?
Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.
"Ed is the standard text editor." Ed, the greatest WYGIWYG editor of all.
ED IS THE TRUE PATH TO NIRVANA! ED HAS BEEN THE CHOICE OF EDUCATED AND IGNORANT ALIKE FOR CENTURIES! ED WILL NOT CORRUPT YOUR PRECIOUS BODILY FLUIDS!! ED IS THE STANDARD TEXT EDITOR! ED MAKES THE SUN SHINE AND THE BIRDS SING AND THE GRASS GREEN!!
When I use an editor, I don't want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!!
TEXT EDITOR.
When IBM, in its ever-present omnipotence, needed to base their "edlin" on a UNIX standard, did they mimic vi? No. Emacs? Surely you jest. They chose the most karmic editor of all. The standard.
Ed is for those who can *remember* what they are working on. If you are an idiot, you should use Emacs. If you are an Emacs, you should not be vi. If you use ED, you are on THE PATH TO REDEMPTION. THE SO-CALLED "VISUAL" EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE FAITHLESS. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!!
Parent
Re:Interesting... (Score:5, Funny)
Parent
Re:I HATE VI. Convince me otherwise. (Score:5, Informative)
in a word, yes.
more specifically, Vim can do everything Emacs can do, and has a lot of features i find every other editor lacking in. there's even an IRC client [vim.org].
there are lots of ways [vim.org] to do it. there is also a good deal of built-in support that works with most of what you'd do out-of-the-box. (note: i don't use folding much, but i instead rely on '%' to jump around and '#' or '*' to find definitions.)
in the standard distribution of Vim in Gentoo, that's on by default. as you type, opposing brackets are highlighted and missing pairs are marked with color. elsewise, you can use '%' to find matching parens, brackets, braces, whatever very quickly.
personally, i find sed to be more than adequate for the job. if you want integration in your editor, these commands might work:
:argdo %s/foo/bar/
:bufdo %s/foo/bar/
:windo %s/foo/bar/
:!. of course, being somewhat of a fairly new user to Vim (only been using it for a couple years now), i'm always learning new features.
...although if you want to modify files not already open in the editor, again, sed works just as well and can be run from within vim with
Parent