Slashdot Mirror


A Visual Walkthrough of New Features in Vim 7.0

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.'"

10 of 406 comments (clear)

  1. Re:No, it's *not* Moolenaar by Scarblac · · Score: 4, Informative

    No, it's Bram Moolenaar. He's Dutch, molenaar means miller, and moolenaar is an old spelling of that. Both Molenaar and Moolenaar are common names; Mölenaar is just wrong, Dutch doesn't use umlauts like that.

    --
    I believe posters are recognized by their sig. So I made one.
  2. Bill Joy by Brainix · · Score: 5, Informative

    For the younger ones in the audience, Vim is a superset of vi, which was originally written by Bill Joy.

    Yes, the same Bill Joy who heavily contributed to BSD, TCP/IP, NFS, and csh.

    Yet I still count vi as one of his top contributions. :-)

    --
    Raj Against the Machine! http://social-butterfly.appspot.com/
    1. Re:Bill Joy by MickDownUnder · · Score: 3, Informative

      You might also have mentioned he's the same Bill Joy who was chief architect at Sun through it's hay days.

    2. Re:Bill Joy by MickDownUnder · · Score: 3, Informative

      Oh and he was also co-founder of Sun Microsystems...

      And a recent attendee of the Dropping Knowledge forum in Berlin, where he had this to say... when asked the question "Why don't we dump all patent laws all around the world and stop restraining creativity and innovation?"

  3. Re:New features by tehshen · · Score: 4, Informative
    --
    Guy asked me for a quarter for a cup of coffee. So I bit him.
  4. While it may be free by also-rr · · Score: 5, Informative

    It is also charity ware. The website asks for donations to a charity that helps children in Uganda.

  5. Re:Default mode by swordgeek · · Score: 3, Informative

    Sucks to be you.

    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.

    --

    "People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
  6. Re:Default mode by TheBogBrushZone · · Score: 5, Informative
    Does Vim still default to starting in command mode? I suppose it does (...) It's a text editor, it should start in insert mode like every other editor.

    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.

    Pressing some key to start typing is bloody annoying, then pressing Esc to insert commands is also annoying.

    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.

    Ctrl-sequences are much better, and the default insert mode means I can do simple text editing and slowly learn other commands of the editor.

    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.

    To be honest, I also find Vim's shortcuts extremely unintuative. Want to go to the end of the document? 99% of editors, Ctrl-end. Vim, G. Sorry, that's retarded.

    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.

    Maybe it's based in the days of legacy terminals that didn't have arrow keys or even control sequences, but we're not in those days anymore; it's the text editor equivalent of still using a green-on-black text-only monitor.

    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.
    --
    And behold, a command prompt and he who sat upon it, his name was shutdown and -h 3:11 followed with him
  7. Returning to VI(M) by qazwart · · Score: 4, Informative

    I've been programming since the 1970s when we really didn't have screen editors. We used line editors, and had to keep retyping the "list" command to see how our program was shaping.

    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.

  8. Re:Please help me with vim by nickos · · Score: 3, Informative
    Like probably many people, I have the "inverse T" cursor key layout deeply etched in muscle memory, and I much prefer this to having left, down, up, right in a row like hjkl is (although I'm sure others prefer having all the keys on the home row). As a result I use ijkl to move the cursor and h to insert (this also means that touch typists get to keep their fingers on the touchtyping home keys and just move their second finger to i when they move the cursor up). This is what the relevant part of my .vimrc file looks like:
    " remap h to insert and use ijkl for inverse T cursor movement
    map h <insert>
    map i <up>
    map j <left>
    map k <down>