Vim 7 Released 665
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."
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
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:3, Funny)
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?
Re:waiting (Score:3, Insightful)
Re:waiting (Score:4, Informative)
Re:waiting (Score:3, Insightful)
Re:waiting (Score:3, Informative)
Vim Crash Course :wq (Score:3, Informative)
Once you launch vim, you're in command mode. You do stuff in command mode.
When you need to type something, you need to switch to insert mode. Type i in command mode for that.
Type all of these in command mode to use them. To move from insert mode to command mode, press ESC.
j - move down
k - move up
h - move left
l - move right
i - inser
Re:waiting (Score:4, Informative)
This is an effective little program for learning basic vi/vim.
Re:waiting (Score:5, Funny)
Nope. What can you tell me about it?
Re:waiting (Score:3, Informative)
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.
Re:waiting (Score:3, Informative)
Not so! That's why there's Viper.
I was firmly on the vi side of the argument until I realized that emacs includes everything you could possibly want to edit code, including vi.
Re:waiting (Score:3, Informative)
You can have hours of work erased just by forgetting that vim has multi-level "undo", and that instead of being able to undo the undo you just accidentally undid, you'll be undoing something else, maybe even an entire paragraph somewhere else in the file.
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
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
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 :).
Re:waiting (Score:3, Funny)
Or
<Esc>23 u 3 <Ctrl>-R
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.
Re:waiting (Score:5, Informative)
Re:waiting (Score:4, Insightful)
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.
Re:waiting (Score:3, Insightful)
So either remotely accessing a client's system, or doing on-site support, I could always count on vi to be there. That's why when I took the holy decision between diving into vi or emacs, I picked vi.
Now, I agree it has the most user-unfriendly interface, but once you know how to use it, it is very powerful. I still use it
Re:waiting (Score:3, Insightful)
For me, I don't want a GUI editor. I do to much (almost 100%) of my work over a terminal connection, and the GUI overhead is not worth anything to me. In fact, I have vi aliased to vim -X which turns off some X support. I don't remember what, but it gave me grief for some reason years ago enough to turn it off.
Vim is way above vi. One thing I use all the time is "visual" mode, which is like selecting areas of text with a mouse and I can pipe that data through a filter, do a sear
Re:waiting (Score:3, Interesting)
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
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.
What's that odor ? (Score:3, Funny)
Re:What's that odor ? (Score:2)
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
But seriously.... (Score:2)
DG
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."
Re:Ahhhhh.... (Score:3, Interesting)
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.
Re:Ahhhhh.... (Score:3, Insightful)
Because firing up emacs in order to edit a text file is like using a backhoe to dig a post hole. Sure, you can do it with the right attachments (the auger) but you could get it done just as quickly and a lot more cheaply by just using a post hole digger. Emacs probably uses at least twice the system resources vim does (I'm not doing a comparison so I'm sticking with small statements) and
Re:Ahhhhh.... (Score:3, Informative)
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:2)
[Esc]:q
Re:Let's try it out (Score:2)
Dammit Jim, next time tell them its CTL+ALT+BACKSPACE !
Re:Let's try it out (Score:2)
Re:Let's try it out (Score:2)
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*
Re:Let's try it out (Score:3, Interesting)
I was trying to contribute to a project using Mercurial [selenic.com], 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
Spell Check (Score:4, Funny)
Re:Spell Check (Score:3, Funny)
Or if you use Emacs you can wish you were dead.
(ducks)
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.
On OS X, it's all about SubEthaEdit (Score:2, Informative)
Then i found SubEthaEdit [codingmonkeys.de] for mac os x.
I've really found no need for anything else since. I highly recommend anybody on an apple try it out. I feel like it follows the philosophy of vi (lightweight, responsive, simple, functional), but integrates well with the rest of the OS (uses apple's spell check, plays well with os x services and keyboard shortcuts). and, though i know this isn't for everyone, it follows apple's emacs-style ctrl-f, ctrl-b, etc navi
Re:On OS X, it's all about SubEthaEdit (Score:4, Funny)
slightly different paradigm (Score:5, Interesting)
Re:slightly different paradigm (Score:2)
Which is why I switched from emacs. Ever tried coding in emacs with a broken wrist? It's hard enough with two functional hands.
The ESC key annoys me (Score:3, Interesting)
Re:The ESC key annoys me (Score:3, Informative)
Re:slightly different paradigm (Score:3, Informative)
^X^F in insert mode to complete files. Gotta have it. Better than trusting my fingers, and takes less typing.
Re:slightly different paradigm (Score:3, Insightful)
Cut, copying, and pasting others' code
Sure, ^S is simple. But then you are in "the mercy of the editor" mode. Then your editor is going to ask you, "Do you want to save your changes?" "Do you really want to overwrite the file?" "Are you really, really sure you want to save
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.
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!
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.
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:2)
Re:My history with VIM (Score:2)
Re:My history with VIM (Score:5, Insightful)
it is what it is (Score:3, Informative)
:wq (Score:2, Interesting)
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)
"Intelligent" completion (Score:2)
I don't know why, but I've gotten used to Ctrl+[pn] and prefer that over popups that other IDEs seem to throw up.
Re:"Intelligent" completion (Score:2)
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:2, Informative)
Paste is usual Shift + Insert.
Also you can use -
Esc v -> visual mode - character wise
Esc Cntrl+V -> Visual mode - coloumns
Whatever is in the visual mode also copies. So very easy
Re:Cut and Paste? (Score:2)
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.
My favorite editor (Score:5, Funny)
made with vi [dimspace.com]
Re:My favorite editor (Score:2)
And shockingly enough... (Score:5, Funny)
Re:And shockingly enough... (Score:5, Funny)
still hungry people in Uganda (Score:2, Informative)
Someone had to... (Score:3, Funny)
Re:Someone had to... (Score:3, Funny)
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
On any UNIX box vi is always there for you (Score:3, Insightful)
Isn't Vi part of POSIX and Unix Specification? (Score:3, Interesting)
Cool. As a Debian user... (Score:3, Funny)
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.
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.
Re:I 3 VIM (Score:3, Insightful)
Are you talking about ctrl+backslash functionality, or something else?
^\ (F14) (M-R) Replace text within the editor
Though it doesn't say so, you first enter a search string and then a replace string. You then get a confirmation on each instance.
Re:I 3 VIM (Score:3, Insightful)
Another Cheat Sheet (Score:4, Informative)
Re:I 3 VIM (Score:3, Informative)
http://limestone.truman.edu/~dbindner/mirror/#Vi-
"The spirit of Vi on one page."
Steep learning curve...? (Score:3, Funny)
First vi encounter (Score:3, Interesting)
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.
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!
Comparing with Eclipse (Score:3, Insightful)
Re:Vim mean... (Score:2)
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.
Re:No Mac Version 7 (Score:5, Informative)
http://macvim.org/OSX/index.php [macvim.org]
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!!!
Re:Interesting... (Score:5, Funny)
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