A Visual Walkthrough of New Features in Vim 7.0 406
An anonymous reader writes "Anybody who has used Linux or any other OS would be aware of the very powerful and feature rich text editor Vi. This interesting article takes a visual look at some of the new features in the latest version of Vim 7.0 — a Vi clone created by Bram Moolenaar. From the article: 'Just for once, I wouldn't mind siding with the beast if that is what it takes to use Vi. The modern avatar of Vi is Vim — the free editor created by Bram Moolenaar. Riding from strength to strength, this editor in its 7th version is a powerhouse as far as an editor is concerned. When ever I use Vim (or GVim for that matter), it gives me the impression of the Beauty and the Beast.'"
editors are for wimps (Score:4, Funny)
Of course, "real men" score higher on machismo than common sense.
C'mon.. there is nothing that really needs saying on this topic, let the flame
wars begin.
Re: (Score:2)
Re: (Score:2, Informative)
Re: (Score:2)
Re:editors are for wimps (Score:4, Funny)
>Real men just input the entire program at the command line using cat>myprog.c
Huh? Try directly typing into GCC next time, you know, like:
Re: (Score:2)
Ed, man! (Score:5, Funny)
http://www.gnu.org/fun/jokes/ed.msg.html [gnu.org]
Re:editors are for wimps (Score:5, Interesting)
Re:editors are for wimps (Score:5, Interesting)
He got in the habit of getting it right the first time.
Re:editors are for wimps (Score:4, Interesting)
On a slight tangent, I worked for a UK bank around 1988 who had a service where they sent big customers mag tapes of the previous nights checks/cheques for reconcilliation. One tape merged two accounts in error so we had to reproduce the two accounts by hand by having an entire department type out and check 20,000 punch cards over a few days and nights. To add insult to injury, the completed tape was then couriered by motorbike to the customer but the bike crashed and the tape got smashed so we had to get another tape done which took a further 24 hours.
Youngsters these days with that there Inteenet thang don't know they're born!
Re: (Score:2)
The modern man, however, uses nc -l 1234 > myprog.c.
Re:editors are for wimps (Score:5, Funny)
A real man writes directly to the disk with a magnetised paperclip.
Re:editors are for wimps (Score:5, Funny)
in my day we had to arrange stones monoliths on hills to store data.
Re:editors are for wimps (Score:5, Funny)
Re: (Score:3, Funny)
Re:Meanwhile... (Score:4, Funny)
Fetch porn?
Real men don't sit at their computers all day (Score:2)
Re: (Score:2)
Please help me with vim (Score:2)
I know the best way to learn to use Vim is to use it every day. My main editing tasks everyday are Latex processing and Java development. Usually I use Kile and Eclipse to solve my problems. As you can see I something like an IDE wore (wow). But I really would like to
Re: (Score:2, Informative)
Re: (Score:2)
Personally I took in more when I read read the reference manual [sourceforge.net] rather than the tutorial. http://vimdoc.sourceforge.net/ [sourceforge.net] has the manual in PDF form, as well as a Vim book, FAQ and other guides.
As for your cursor keys question, I guess it's due to tradition. You can use the 'map' command to change what the jkl and ; do.
Don't... (Score:2)
I was asked this the other day. Use an IDE, it is easier than using vim, why cause yourself pain?
Learn vi if you want to do large scale file manipulation, searching etc. But really don't bother if all you want to do is Java and Latex.
Now if you used troff... then you should do it in vi, troff demands that you have nothing to help you and create completely incomprehensible documents to all concerned. Also if you are doing Unix admin then learn vi.
Vi and Emacs are superb, in the same way as the Mustang fro
Re: (Score:3, Insightful)
By using "cursors" it was possib
Actually, it's the only way (Score:5, Funny)
I know the best way to learn to use Vim is to use it every day.
That's the only way. Getting to like vi (or vim) requires that you damage your brain, and a tool to do that is already to hand - vi. After using it every day for a while, it will seem quite natural to you that the letter "l" is the command to move the cursor to the right.
Re: (Score:3, Informative)
As people were using it on other terminals, they discovered that it didn't matter what the key actually said and that it was just a good key binding.
Re:Please help me with vim (Score:4, Informative)
Re: (Score:2)
Re:Please help me with vim (Score:5, Insightful)
Re: (Score:2, Interesting)
Re: (Score:2)
Re:Please help me with vim (Score:4, Insightful)
Open a terminal and stick with it.
Symlink eclipse to vi.
That is perhaps the worst bit of advise I have seen so far. If they have a job to do, then they should not switch away from what gets the job done quickest for them. A far better bit of advise is to use vi for when the IDE does not help. Such as quick edits, shell script editing or config file changing. That way they still can get their job done in a reasonable amount of time but still get to use vi on a regular basis.
Re: (Score:2)
If you are using Eclipse right, you should always be faster in it. An IDE can handle a lot of code/class generation for you. It's much like vi; unless you learn the not-so-obvious features, you'll never get the most out of it.
To start off, use type "whi" and hit control space. Try some of the while loop autogeneration templates and use the TAB key to jump through the fields. Another example, NEVER create a class. Just reference i
Emacs (Score:5, Interesting)
But vim is pretty cool too (I have windows ports for both the editors so I can use both in office). Arguing over which is better is a waste of time IMO, both do their job fantastically well.
Re: (Score:2)
Re: (Score:2)
I agree.
Although it looks like the IDEs are getting features that the great text editors won't get any time soon; I was particularly impressed when I saw the Java refactoring things in Eclipse. Just select a few lines with a loop or so, right-click 'Extract method', name it and the rest is automatic. Emacs and vi won't get that sort of language integration ever, I think.
But since that won't work well for more dynamic languages anyway, and the current job is Perl... yay for Emacs :-)
Re: (Score:2)
Can't speak for vim, but there is at least one Java refactoring tool [xref-tech.com] for emacs.
Not too surprising if you think about it. The whole point of emacs is that it's extensible. If there's something you want - write it!
Re: (Score:2, Informative)
Might not get, but Eclipse has got ViPlugin. So you actually can use familiar vi-editing inside eclipse with all the bells and whistles of eclipse!
Re:Emacs (Score:4, Interesting)
Re: (Score:2)
vi has always been a fairly lightweight editor. It functions on a minimal system, and is ubiquitous. Also, it's not written by RMS. These are all good features.
Two editors have two different niches. As you say, they both do their respective jobs fantastically
Re:Emacs (Score:4, Funny)
Enough said, yet the author goes on to write an entire paragraph?
Perhaps Neal Stephenson does not quite grasp the meaning of "enough?" Judging by the length of his books, I guess that's probably true.
Bill Joy (Score:5, Informative)
Yes, the same Bill Joy who heavily contributed to BSD [wikipedia.org], TCP/IP [wikipedia.org], NFS [wikipedia.org], and csh [wikipedia.org].
Yet I still count vi as one of his top contributions.
Re:Bill Joy (Score:4, Informative)
Re: (Score:3, Funny)
Re:Bill Joy (Score:4, Informative)
And a recent attendee of the Dropping Knowledge [droppingknowledge.org] forum in Berlin, where he had this to say [droppingknowledge.org]... when asked the question "Why don't we dump all patent laws all around the world and stop restraining creativity and innovation?"
Looks good (Score:5, Funny)
New features (Score:3, Funny)
Re:New features (Score:5, Informative)
"later" command ... (Score:5, Funny)
I realise that I have made a mistake. I can easily take the document to a point 10 minutes back by using the command
Or for that matter, move to a point 5 seconds ahead by using the command:
Re: (Score:2, Funny)
I cranked up my emacs to see if it had that-
M-x earlier 10y
And I got vi.
After searching the internet on how to do fucking anything in vi (I forgot the
And I'm back again. Whew. So yah, later works too.
Re: (Score:3, Funny)
Re: (Score:2)
When Pressed For Time... use VIM (Score:5, Funny)
FTFA:
AWESOME! Need to finish writing a paper? Normally take about 2 hours? Just type in
:later 2h
No muss, no fuss.
While it may be free (Score:5, Informative)
Prime Difference between Linux and Windows Users (Score:5, Funny)
Re: (Score:2)
Re:Prime Difference between Linux and Windows User (Score:5, Funny)
Noooooooooooooo......
Re: (Score:2)
Increasingly unfortunate name (Score:5, Interesting)
As a sysadmin, I have to ask how features like pop-up spellcheck and "omini" completion will help me edit config files on a vt102 terminal, (OK, my hard terminal is actually a vt520). vim is basically becoming a graphically-dependent editor that happens to use a similar editing structure to vi. Yes, I know about vi compatability mode, but that just throws out most of the last 'n' years of development.
My point? Not that development should be stopped, or that these goll-durned newfangled features ain't right, but that I wish it wasn't always trumpeted as "vi--but better." Most of the 'better' part of is are things that point away from vi.
Re: (Score:2)
As a sysadmin, I have to ask how features like pop-up spellcheck and "omini" completion will help me edit config files on a vt102 terminal, (OK, my hard terminal is actually a vt520). vim is basically becoming a graphically-dependent editor that happens to use a similar editing structure to vi. Yes, I know about vi compatability mode, but that just throws out most of the last 'n' years of development.
Those features are aimed at people using vim as a programming editor (although I use it for emails via m
Better XML support? (Score:2)
Fancy stuff I would like; smartly(!) adding closing tags (i.e. only if needed to make the document wellformed, skip adding a closing tag if there's
Re: (Score:3, Interesting)
:%!xmllint --format
:%!xmlwf
Point those people at gvim (or, if they don't want a modal editor, evim).
The rest of your suggestions are more
Re: (Score:2)
http://www.gwdsoft.com/ [gwdsoft.com]
Free 30 day trial then $29.99 shareware. Well worth the money.
Vim is great, but.. (Score:2)
I even tried to close firefox with that a few weeks back.
For me though, programming without vim would be horrific. I've used Vim for so many years that I probably couldn't use another editor.
I tried Kedit, because some of my students were using it and I thought I should have a go, but I found it too krufty.
Since 90% of my programming is console based (the other 10% being shitty text only websites created in Vim, and slightly more f
Re: (Score:2)
Vim is good (Score:4, Interesting)
- it is small
- it does a lot of things that are useful for editing source files
- it is very economical with bandwidth etc
- all commands map to keys that are found on all terminal keyboards
If I should say anything against vim it would be that it can do too many things that are only eye candy or 'cool features'. Fortunately you can turn them off, which I always do. If you develop on several different UNIXes (and other OSes with UNIX like environments) getting used to all the extra features in vim can be a real pain, when you have to work with the classic form of vi.
Burn him! (Score:5, Funny)
Recently, Richard Stallman gave a speech in which he illustrated an academic point about programming history by quoting a guy who described vi as 'an editor spread at sword-point and which is really hard to use'.
I think I speak for all moderate vi(m) users when I say -- DEATH and DAMNATION (in that order) to this Cardinal of the CTRL key! Needless to say my own local vim user group has dispatched assassins to kill Mr. Stallman, but this is hardly the end of the story. The fact is that a man has referred to another man who in turn expressed some often-voiced reservations about OUR EDITOR! On behalf of all editors of text everywhere, I implore EMACS users to return to the true path, lest you be burned at the stake and then go to hell, the Buffer From Which There Is No Unloading. We'll see how productive you are then, with your ctrl-meta-alt and your ELISP and your 'ring buffer', whatever THAT is.
Peace and love to all.
^C
^X
quit
q
QUIT
exit
zz
ZZ
B*rn you, vimperialist! (Score:4, Funny)
Ctrl-this Shift Meta Ctrl-that (Score:2)
I wish that some of the more modern IDE plugins would suck less when it comes to syntax highlighting and automatic code formatting, but I do not see much place for dinosaurs like vi(m) in my daily routine any more.
I wonder why those who still use vi not also u
The elegance of vi (Score:5, Interesting)
vi lets you access all of its powerful functionality using only these natural keys for typing (well, plus ESC, which is another computer addition, but its only used to flip out of insert mode, when you're done a bunch of typing, typically). Being able to move to the top of the screen by typing capital-H is a lot faster than control-whatever/control-whatever, or taking your hand off the keyboard, reaching for your mouse, aiming, and clicking. (It still amazes me that this latter approach is the one that leads the way in modern word processors, due to its obvious, but inefficient, nature.)
This is why vi fans often joke as emacs standing for escape-meta-alt-control-shift; to a seasoned vi user, all the escapes in emacs are far more confusing than the biggest complaint about vi, it's two modes. (Reminds one of the joke about the newbie asking the TA for help; the TA says, "you do know vi has two modes, right?" The newbie replies, "yes, the one where it beeps, and the one where it doesn't.") But at the end of the day, the concept of two modes isn't rocket science to learn, and as far as all the key commands one has to learn, it's no different than emacs, where I found the key sequences far more confusing.
Re: (Score:2)
Well, the command mode itself has two modes thanks to caps lock.
My problem with vi and emacs is that they have failed to evolve in an environment where ui design really has advanced.
vi is ok for doing quick edits in an xterm. But I still think of it as a tacked on editing mode for more.
I was wondering who would point this out first (Score:2)
Don't get me wrong, it was immensely powerful, even back then....it just wasn't even remotely user-friendly until you gained some serious experience with it.
On the other hand, vi was also a bit cryptic but did not have as many features. However, the learning curve was a lot shorter in my op
The two modes are the deal (or deal breaker) (Score:4, Insightful)
1) Those who can think very clearly and can write whatever they need to in one go, without ever having to revise it.
2) Those who cannot write even a single line without needing to use the delete feature 10 times.
For the type 2) people vi is not a useable editor. At least not for anything that requires writing more than a couple of lines. I unfortunately am a type 2) person and have to live with emacs. IOW vi is for perfect people, and I am actually a blathering idiot when it comes to typing in my thoughts or code.
I still use vi quite a lot, for quick editing. But if I have to write more than a couple of lines then I start searching for emacs.
I am quite used to the two editors. Since when you are within emacs you can do almost anything, there is very little motivation to learn another editor. This is why I hate having to use any other program that tries to make me learn its editor, and does not provide emacs key bindings.
It is good that some of the emacs key bindings are used in many editors like the firefox input box.
Menus? (Score:2)
Aiiieeeeeeee -- in what level of hell does vim have menus! Linuxers, we hates them we does!
Real men of genius (Score:5, Funny)
Today we salute you Mr. vi editor coder guy.
Mr. vi editor coder guy!
You type at lightning speed while while the rest of us squint our eyes in wonder.
What the hell you just did to my file!?
You scour through code like a red-hot knife on butter
now my file looks funny in Notepad!!
Thanks to you Mr. vi editor coder guy, you remind us, it's all about the code!
Mr vi editor coder guy!
Returning to VI(M) (Score:5, Informative)
VI was actually not the first screen editor I used. The first I used was the old Textedit on the Mac. I thought it was wonderful. I could actually move the cursor around and see what I wrote. My introduction to VI was when I first started working with C on Unix. I hated it.
VI was primative. Where my Mac editor was single mode, I had to switch back and forth between command mode and insert mode with VI. Where my Mac editor would wrap text, VI wouldn't. Where I could easily find a command with the menus, with VI, I had to remember archaic key strokes. Who in the hell wrote this junk!
However, once I started getting use to it, VI grew on me. The commands I quickly learned could be combined. For example, "d" deletes. "e" moves to the end of a word. "de" deletes to the end of a word and "3de" deletes the next three words. "xp" transposes two characters. There was an order to them: "d" for delete", "f" for find, "r" for replace. It started making sense. Then I started learning the ins and outs of RegEx, and I never looked back.
Not only that, but I quickly learned that for program editing, VI simply worked better than Textedit or Notepad. Unlike word oriented text editors, VI was line oriented just like a computer program. I've been using VI ever since. Over the years, I've tried GUI editors (Jedit, Nedit, KDEdit, TextPad, etc.) but I keep returning back to VI.
Most of these young whipper JDs (Java Developers) with their "Object Orientation" and "Virtual Machines" think of my preference for this non-graphical editor as quaint. Sort of like the way you'd look at Grandpa playing around with his model trains. That is until they realize that I can write code a lot faster than they can.
Last year, one developer told me it was going to take a few hours to clean up a particular program. I loaded the files in VI and transformed them in a matter of minutes. He was shocked. How can this "obsolete" little text editor do the job much more efficiently and faster than his feature ladened GUI? Why doesn't his editor support regular expressions? Why can VI load the files in less than a second while it takes VisualStudio three or four minutes? How can I write a program and never have to touch the mouse?
My sons have just started taken up programming. My 15 year old kid likes working with PHP, and first refused to even look at VI -- to old fashion and out of date -- just like his dad. He had a *better* IDE that was made specifically for HTML/PHP web development.
I recently caught him using VI. He had to admit that once you get over the basics, VI is faster and easier to use for his needs. My oldest is in college and I saw using VI for writing his term papers and essays. He said he found working with VI better because it kept him concentrating on content than formatting. Plus, it makes writing a lot faster. Takes a lot of time switch to the mouse each time really slows you down. He showed me how he programmed a macro spell checker using an ASCII dictionary and ispell. He also showed me the "linebreak" feature in VIM (something I didn't know about).
After all these years, I still haven't found anything that is as efficient as VI for editing. From what I see in Linux world, a lot of younger programmers who grew up with nothing but graphical interfaces agree with me.
Re: (Score:2)
Re:No, it's *not* Moolenaar (Score:5, Funny)
#ifndef READER_IS_GERMAN
An example
E.g. Göring -> Goering, or Führer to Fuehrer.
#else
#endif
Re: (Score:2)
Re:No, it's *not* Moolenaar (Score:5, Informative)
Re: (Score:2)
Dutch uses umlauts like that. See for example "überhaupt", which while originally German can be found in Dutch dictionaries. And if you're referring to words such as "poëzie", that's a trema, not an umlaut.
Re:Its been decided. (Score:5, Funny)
Re:Its been decided. (Score:5, Funny)
Re: (Score:3, Funny)
(And I even remember the days when that was a lot).
Re: (Score:3, Funny)
Re: (Score:3, Insightful)
Re: (Score:2, Funny)
Re: (Score:2)
If you mean what I think you mean, you can get that by setting u in your cpoptions setting.
Re: (Score:2, Informative)
I find ctrl sequences to be a total pain. Most of the time, I want to use several commands in a row. Rather than hit ctrl+ each time, I only have to hit escape once (all sane vim users remap capslock to escape), then the commands, then i to start inserting text again.
I just deleted my
Any other complaints?
Re: (Score:3, Informative)
My first serious use of vi was under OpenBSD 2.6 and I forced myself to become relatively proficient because I recognized that vi was the universal reference point for console administration. For creative work (writing code, documentation) I slogged through the emacs learning curve and eventually found a pleasant comfort level, though never equalling my old proficiency with Brief under MSDOS. Sometimes I manage to get twenty powerful psgml-mode commands embedded into my fingers, but they are soon gone aga
Re: (Score:2)
2) The cursor position in normal mode is one-behind the cursor in insert mode, so if you switch between normal and insert mode, you'll wind up moving backwards.
Re:Default mode (Score:4, Informative)
I work on dozens of modern, high-end systems that don't have arrow keys. In fact, the only access to many of them is through an amber-on-black text-only monitor (hey, we've evolved from green on black!
If you don't like vim, fine--there are those other 99% of editors that you can choose from. However, that's not a valid reason to change it from what it was designed for (or at least what vi was designed for) and in the process piss off the people who use it the way it is.
In short, don't try to change MY editor to suit YOUR desires. -g may be an unintuitive way to get to the end, but you can do it without having to move away from the home-row on the keyboard, it works on all terminals, and 1-g to get to the top of the file or 341-g to get to the line that some config file parser told you was the source of your error is a lot more consistent and efficient than having different keystrokes for each function, and having to scroll to a specific arbitrary line.
It's not a friendly editor. It's an efficient and universal editor.
Re: (Score:2, Insightful)
In vim, Ctl+End does go to the end of the document. All of the other arrow key motions work like you would expect as well.
It starts in command mode probably because you almost always need to move the cursor before you resume editing a file. Command mode gives you dozens of powerful commands to navigate to where you need to go in a couple of keystrokes instead of just banging on
Re:Default mode (Score:5, Informative)
It has something called 'Easy mode' for those who dislike the mode distinction or just want to use a dubmed-down editor interface. And why should starting in insert mode be the 'right' thing to do just because other editors do it? 99% of the time when I first open a text file I don't want to start inserting text. I want to navigate somewhere, usually by searching for a string or a line number.
You seem to be very easily annoyed. Use vi or ViM for a while and the dual mode system becomes second nature and you miss it in other applications.
I don't see any major disadvantage here. You can do the same with ViM. All you need to start with are 'i', 'ESC' and 'ZZ'. The cursor keys and most of the navigation keys work in the same way as other editors until you learn to use the more advanced navigation available.
Did you actually try doing that in ViM? CTRL-END works just the same as G. Has done for a long time. And why should using one arbitary key combination be more 'retarded' than another? CTRL-END could just as correctly be used to terminate the application or insert the letters 'E', 'N' and 'D'. You are entitled to your opinion but it's just arrogance to assume your interpretation is the only valid one.
It's called Vi iMproved. It takes the features that people found useful with vi (and its predecessors) with newer features added (not that the Control key you seem to have an obsession with is exactly a cutting-edge invention). Most developers I know, myself included, prefer ViM because it contains a wealth of practical features and a fast, efficient user interface for those with the patience to learn a little and get past the preoccupation with Microsoft-prescribed keyboard shortcuts.
Mine starts in insert mode (Score:2)
Name | vim-enhanced
Version | 6.3
Release | 21mdk
Group | Editors
Size | 1239458
Packager | Olivier Thauvin [nanardon at mandriva.org]
Summary | A version of the VIM editor which includes recent enhancements
Description | VIM (VIsual editor iMproved) is an updated and improved version of the vi editor. Vi was the first real screen-based editor for UNIX, and is still very popular. VIM improves on vi by adding new features: multiple windows, multi-level undo, block highlightin
Re: (Score:2)
But if you don't like it then quit yer bitching. Use something else...
Re: (Score:2)
nvi seems to no longer be developed, unfortunately. If it does what you want, though, great.
Re: (Score:2)
(uppercase to append). The 'q' command is disabled
while executing a register, and it doesn't work i
Re: (Score:2)
People who set their ts to 8 scare me.
Re: (Score:2)
Re: (Score:3, Insightful)
- automatic removal of wired up events from your code when it encounters certain problems (designer loaded without a proper compile, and sometimes just plain random)
- reformatting of HTML code (muffled scream) even when you turn off all reformatting code
I could go on and on with problems of Visual Studio which you wouldn't see unless you're working on a BIG app