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.'"
Re:Please help me with vim (Score:2, Informative)
Re:No, it's *not* Moolenaar (Score:5, Informative)
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:New features (Score:5, Informative)
While it may be free (Score:5, Informative)
Re:editors are for wimps (Score:2, Informative)
Re:Default mode (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:Bill Joy (Score:4, Informative)
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: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.
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?"
Re:Emacs (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:Please help me with vim (Score:1, Informative)
Re:Default mode (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 again when I'm no longer working with those document types. I'm one of those people that never recovered from the CTRL key being displaced by the lawyers and losers CAPSLOCK key. As far as I'm concerned, all the lawyers out there writing license agreements should stick the 40 column upper-case only Apple ][. That's about the speed that the legal profession cleans up their own messes anyway, but I digress.
In my view the problem with vi as a universal editor is that the rules for leaving insert mode are *not* universal. Under OpenBSD 2.6, almost any use of the arrow keys breaks you out of insert mode. Other versions of vi will leave you in insert mode within some nearby region of the inserted text region, but break you out if you move further away.
Modes are bad enough to begin with, though I'm willing to live with a mode or two where there is a sufficient pragmatic justification. What I'm not prepared to contend with on a daily basis are inconsistent rules regarding magic-mode switches as an unintended/unexpected consequence of common actions (e.g. cursoring around).
Nor am I prepared to memorize and apply inconsistent commands to disable or override inconsistent mode switches on a per system, per host, per revision, per version, per day-of-the-week basis. I'd rather wrangle with the hopelessly misplaced CTLR, ALT, and Mr Bill keys.
Perhaps vim has defeated the mystery mode switches associated with cursor actions. But my purpose in learning basic vi was to have a consistent editor available on any system I might need to use, not just a consistent editor when an ideal flavour of vi happens to be installed, so it's worthless to me.
Re:Woohoo: Eight Megabytes And Continuously Swappi (Score:2, Informative)
As for GVim, I like the combo interface on Windows. On the Mac, there's a few GUI inconsistencies, but you have to love the fact that the console program is identical. And who worries about 13MB anymore for a PC when a 1GB stick costs around $65?
Re:Actually, it's the only way (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.
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:Please help me with vim (Score:4, Informative)