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

62 of 406 comments (clear)

  1. editors are for wimps by joss · · Score: 4, Funny

    Real men just input the entire program at the command line using cat>myprog.c
    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.

    --
    http://rareformnewmedia.com/
    1. Re:editors are for wimps by Anonymous Coward · · 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:

      gcc -x c - && ./a.out
        #include <stdlib.h>
        #include <stdio.h>
       
        int main(void) {
            if(puts("H., w.!")==EOF || fflush(stdout)==EOF) {
                fputs("Failed writing to standard output!\n", stderr);
                return(EXIT_FAILURE);
                }
       
            return(EXIT_SUCCESS);
            }
        ^D
    2. Re:editors are for wimps by laejoh · · Score: 2, Informative

      Or http://hessling-editor.sourceforge.net/, if you're into that kind of thing...

    3. Re:editors are for wimps by clickclickdrone · · Score: 4, Interesting

      You may laugh, I knew someone that coded that way. They sat, thought, mapped it all out in their head then typed it all in top to bottom in one go. Worse still, it worked first time 99% of the time and I don't recall them ever producing a single bug. Git. This was Dbase III+ FWIW.

      --
      I want a list of atrocities done in your name - Recoil
    4. Re:editors are for wimps by Armer+Hund · · Score: 5, Funny

      Real men just input the entire program at the command line using cat>myprog.c
      A real man writes directly to the disk with a magnetised paperclip.

    5. Re:editors are for wimps by include($dysmas) · · Score: 5, Funny

      a disk? you luck pucker.

      in my day we had to arrange stones monoliths on hills to store data.

    6. Re:editors are for wimps by NearlyHeadless · · Score: 4, Interesting
      In the non-fiction book The Cuckoo's Egg, Clifford Stoll is trying to get a call to his computer in Berkeley traced; the person at British Telecom that he talks to originally took computer programming via a correspondence course. He had to write his program out on coding forms, then mail them. They would be keypunched and he would be mailed back the output from the line printer.

      He got in the habit of getting it right the first time.

    7. Re:editors are for wimps by clickclickdrone · · Score: 3, Interesting

      That was pretty common not that long ago. Most people I know who did programming/science/engineering at University in the 80's did it on clunky old timeshare systems where they wrote the programs (Fortran, usually), punched the cards, sent them off and waited a week. Don't even start talking to them about dropping their card stacks...
      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!

      --
      I want a list of atrocities done in your name - Recoil
    8. Re:editors are for wimps by orasio · · Score: 2, Funny

      Chuck Norris just stares at the phosphor triads, and the inscription starts glowing from then on.

    9. Re:editors are for wimps by roystgnr · · Score: 5, Funny

      So you're the one who littered a bunch of tiny 40 ton monoliths all over the database hills I arranged, huh? Jerk. Now I have to wait for the next glaciation to reformat.

  2. Re:Please help me with vim by oggiejnr · · Score: 2, Informative

    LatexSuite at http://vim-latex.sourceforge.net/ is brilliant for editing latex documents. It took me a couple of days to initially learn but the tutorial on their site makes starting easy.

  3. Emacs by arun_s · · Score: 5, Interesting
    I used to use Vim extensively, but have now switched to Emacs for the sheer joy of learning something new and interesting. Not trying to flame here, but this is one of the strongest quotes I've read on Emacs (Stepehenson, of course):
    I use emacs, which might be thought of as a thermonuclear word processor. It was created by Richard Stallman; enough said. It is written in Lisp, which is the only computer language that is beautiful. It is colossal, and yet it only edits straight ASCII text files, which is to say, no fonts, no boldface, no underlining. In other words, the engineer-hours that, in the case of Microsoft Word, were devoted to features like mail merge, and the ability to embed feature-length motion pictures in corporate memoranda, were, in the case of emacs, focused with maniacal intensity on the deceptively simple-seeming problem of editing text. If you are a professional writer--i.e., if someone else is getting paid to worry about how your words are formatted and printed--emacs outshines all other editing software in approximately the same way that the noonday sun does the stars. It is not just bigger and brighter; it simply makes everything else vanish.

    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.
    --
    I can explain it for you, but I can't understand it for you.
    1. Re:Emacs by cortana · · Score: 3, Interesting

      On the other hand, arguing is fun and a good way to learn about the editor you don't use because you're not familiar with it. :)

    2. Re:Emacs by Saval · · Score: 2, Informative
      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.


      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!

      --
      --Saval
    3. Re:Emacs by Jah-Wren+Ryel · · Score: 3, Funny

      I use emacs, which might be thought of as a thermonuclear word processor. It was created by Richard Stallman; enough said....

      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.

      --
      When information is power, privacy is freedom.
  4. Re:Its been decided. by SumoRoti · · Score: 5, Funny

    EMACS ? you mean Escape Meta Alt Control Shift ??

  5. 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.
  6. 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:Bill Joy by Nimey · · Score: 2, Funny

      All hail Bill Joy, god of agriculture!

      --
      Hail Eris, full of mischief...

      E pluribus sanguinem
  7. Looks good by 1310nm · · Score: 5, Funny

    I can see myself using the tab and undo features, but the spillchucker adn autocomplete seme useliss 2 me.

  8. New features by dp_wiz · · Score: 3, Funny

    How do i enable that clippy?

    1. Re:New features by tehshen · · Score: 4, Informative
      --
      Guy asked me for a quarter for a cup of coffee. So I bit him.
  9. "later" command ... by martinmarv · · Score: 5, Funny

    From the Article:
    I realise that I have made a mistake. I can easily take the document to a point 10 minutes back by using the command :
    :earlier 10m

    Or for that matter, move to a point 5 seconds ahead by using the command:
    :later 5s


    ... So I don't need to actually do the work any more? I can just start a new file "Project Plan", enter the command ":later 7200s" then print it out?

    1. Re:"later" command ... by Anonymous Coward · · Score: 2, Funny

      Thats actually pretty cool. Funny thing happened though.

      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 :) (thats not a smiley, its a colon), I did a :later 10y

      And I'm back again. Whew. So yah, later works too.

    2. Re:"later" command ... by ajs318 · · Score: 2, Funny

      You've been down to the lower (higher?) levels on Nethack, haven't you?

      --
      Je fume. Tu fumes. Nous fûmes!
  10. Re:No, it's *not* Moolenaar by Hal_Porter · · Score: 5, Funny

    Umulated is when you emulate an umlaut on an pure ASCII system by replacing ü with ue. Or ö with oe.

    #ifndef READER_IS_GERMAN

    An example
    E.g. Göring -> Goering, or Führer to Fuehrer.

    #else

    // can someone else think of some examples that don't make German's spit their coffee?

    #endif

    --
    echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  11. When Pressed For Time... use VIM by chub_mackerel · · Score: 5, Funny

    FTFA:

    I can easily take the document to a point 10 minutes back by using the command :
    :earlier 10m
    Or for that matter, move to a point 5 seconds ahead by using the command:
    :later 5s

    AWESOME! Need to finish writing a paper? Normally take about 2 hours? Just type in

    :later 2h

    No muss, no fuss.

  12. 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.

  13. Re:Its been decided. by Anonymous Coward · · Score: 5, Funny
    EMACS ? you mean Escape Meta Alt Control Shift ??
    Nope, as in Generally Not Used / Except by Middle Aged Computer Scientists.
  14. Prime Difference between Linux and Windows Users by MickDownUnder · · Score: 4, Funny

    Windows Users DON'T get excited about text editors !

  15. Re:Default mode by loxosceles · · Score: 2, Informative

    You can add "startinsert" to your .vimrc

    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 .vimrc to make sure, and ctrl-end and ctrl-home work for me. Although G and gg tend to be faster, because home and end require significant hand repositioning.

    Any other complaints?

  16. Re:Please help me with vim by Scarblac · · Score: 4, Insightful

    Presumably hjkl are much more reliably next to each other than jkl;?

    --
    I believe posters are recognized by their sig. So I made one.
  17. Increasingly unfortunate name by swordgeek · · Score: 4, Interesting

    While I have no doubt that vim is a powerful and useful editor, it's increasingly large laundry-list of features is dragging it increasingly farther away from both the functionality and the philosophy behind vi. Keep in mind that vi is a visual superset of ex. As such, it was designed as a visual text editor that works on any cursor-addressable terminal. All functions are accessible from the home-row of keys, with the exception of the esc key. Editing features use regular expressions. In short, it's the ideal editor for the touch-typing administrator who can count on it working under fairly rough circumstances.

    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.

    --

    "People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
  18. Ed, man! by Anonymous Coward · · Score: 5, Funny

    Vim is nothing compared to Ed, the greatest WYGIWYG editor of all.

    http://www.gnu.org/fun/jokes/ed.msg.html

  19. 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
  20. Re:Please help me with vim by Lusa · · Score: 4, Insightful

    So maybe you could try reducing your dependency on IDEs.
    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.

  21. Re:Please help me with vim by nath_de · · Score: 2, Interesting
    Presumably hjkl are much more reliably next to each other than jkl;?
    Right, on a German keyboard it is jklö for example. To reach ; you have to use the shift key.
  22. Re:Better XML support? by cortana · · Score: 2, Interesting

    One thing that could sell some of my co-workers on vim would be if it had better XML features. Nothing too fancy but at least prettyprinting and a wellformedness check.

    :%!xmllint --format
    :%!xmlwf

    Add a few GUI things to make life easier for people using search+replace and it could well become the preferred editor (people are now making do with editpad, notepad2, xmlspy home edition, etc.)

    Point those people at gvim (or, if they don't want a modal editor, evim).

    The rest of your suggestions are more advanced and I think they fall outside of the scope of a general text editor. I'd try Emacs; it has a lot of features for understanding the semantics of an edited document and can probably do all that you describe.

  23. Re:Its been decided. by mjj12 · · Score: 3, Funny

    No, he means Eight Megabytes And Constantly Swapping.

    (And I even remember the days when that was a lot).

  24. Re:Default mode by Waffle+Iron · · Score: 2, Insightful
    Want to go to the end of the document? 99% of editors, Ctrl-end. Vim, G.

    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.

    Does Vim still default to starting in command mode?

    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 the arrow and Pgup/Pgdn keys like a monkey with RSI.

  25. Re:Prime Difference between Linux and Windows User by rucs_hack · · Score: 4, Funny

    'it looks like you're writing a c++ file!'

    Noooooooooooooo......

  26. Vim is good by jandersen · · Score: 3, Interesting

    But it is also becoming what vi was never really intended to be IMO. What makes vi such a great editor is a number of factors, such as:

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

  27. Burn him! by kahei · · 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 :exit
    zz
    ZZ

    --
    Whence? Hence. Whither? Thither.
  28. 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
  29. The elegance of vi by PhotoGuy · · Score: 4, Interesting
    Not to start an editor war, but one thing a lot of people don't "get" about vi, is how much more natural it is for touch typists. The typewriter keyboard was designed with two shift keys within easy reach. Ctrl and Alt were grafted on later for computers, and are less natural to reach (and in the early days, there were only ones for the left fingers, making things like Ctrl-T fairly hard on the hands).

    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.

    --
    Love many, trust a few, do harm to none.
  30. Re:Its been decided. by archeopterix · · Score: 2, Insightful
    EMACS ? you mean Escape Meta Alt Control Shift ??
    Good point. Vi has much simpler keyboard bindings than Emacs. ZZ
  31. Re:Its been decided. by Anonymous Coward · · Score: 2, Funny

    Hey, wait! Don't just go to sleep without telling us what those bindings are!

  32. Re:Please help me with vim by donaldm · · Score: 2, Insightful

    Basically vi was designed for 24x80 CRT screens of which the ADM3 and the VT100 became the most popular although this depends who you talk to. On an ADM3 the HJKL key actually had the Left, Down, Up and Right arrow keys printed on them hence the convention. I do actually surprise my colleagues by using the basic keyboard (ie. no function or cursor keys) but I have a background of using so many different keyboards (including teletypes) that it is much faster for me to do this.

    By using "cursors" it was possible to write a termcap (BSD) or terminfo (SYS V) that would allow the user of vi to use function and arrow keys. This is true even today and is usable by vim or even gvim which is really a vi type window which has graphical capability (ie. mouse) so that you can use the old tty commands and/or mouse.

    There are always advantages and disadvantages in using a GUI or keyboard commands and vim/gvim does give many options. In fact I do find that if you know vi you basically know vim and can very easily use gvim.

    I know many people like Emacs but now is not the time for religious wars like those of the mid 1980's. When people ask me which editor to use I first ask them what they want to do and then outline the pluses and minuses of vi vs emacs (if installed) vs pico (if installed). IMHO I think the best way to describe the editors is:

    vi - excellent general purpose editor (a must if you are a System Admin)

    emacs - very powerful editor but requires devotion to learn properly but well worth it.

    pico - great cut-down emacs editor (low learning curve) for people who just want to type something.

    If you are a Unix System Admin you will find that sometimes you may need to learn "ed" which to many may seem a strange thing to say today but believe me it is important that you know some of the basics of this line editor. I have even seen people use "ed" as their default editor and use it surprisingly quickly and efficiently.

    My apologies to those people who are going to say "what about XXXX" (insert for favorate editor here). If you look at *nix editors you are always guaranteed to have "vi", "ed" and possibly "emacs" all the others are basically add-on's although with Linux you do get "vim" which you can call with "vi".

    Learning "vi" is not as complex as learning "emacs" (not to say don't learn, but the learning curve is steeper) and it is surprisingly easy once you come to grips with the short cuts and how they relate to each other. Examples: [b]ack (word back), [w]ord (word forward), [e]nd (end of word). Also remember upper case is usually the reverse of what you did with the lower case command. There are some excellent books/papers you can get from Google. I find the best way to learn something is to have some serious editing then use the editor you want to learn.

    --
    There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.
  33. Actually, it's the only way by njdj · · Score: 4, 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.

    1. Re:Actually, it's the only way by oohshiny · · Score: 2, Informative

      Well, it was natural on the terminals where it was originally developed, because those keys were marked with arrows.

      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.

  34. Re:Default mode by epine · · Score: 2, 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.

  35. Real men of genius by cabazorro · · Score: 4, Funny

    Real men of genius
    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!

    --
    - these are not the droids you are looking for -
  36. Re:Woohoo: Eight Megabytes And Continuously Swappi by Gr8Apes · · Score: 2, Informative

    I still like IBM's EPM editor (on OS/2). It emulated Emacs, sed, ed, edlin or any other editor if you cared to customize it, and was GUI if you wanted it to be. The memories ... are surely better than the reality ;)

    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?

    --
    The cesspool just got a check and balance.
  37. 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.

  38. B*rn you, vimperialist! by tgv · · Score: 3, Funny

    May the colon key on your keyboard stop working for you and the seven generations to come after you!

  39. 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>
  40. The two modes are the deal (or deal breaker) by anandsr · · Score: 3, Insightful

    There are two types of people.
    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.

  41. Re:Its been decided. by Alioth · · Score: 2, Funny

    I thought it meant "Eventually Mallocs All Core Storage"...

  42. Re:Meanwhile... by arth1 · · Score: 3, Funny
    Meanwhile, a real woman just goes and manually does whatever it is her husband's silly "program" was supposed to do.

    Fetch porn?
  43. Re:VI?!?! by milimetric · · Score: 2, Insightful

    I agree that knowledge of classes in your application is a good thing. However the following "features" of Visual Studio .net 2003 are "bad" things:

    - 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 application. VI shouldn't be used as a substitute for Visual Studio, I agree. But it Should be used as an editor inside Visual Studio. As far as laying out code, there's nothing better than VI. It doesn't obfuscate code, a silly archaic programmer obfuscates code. VI is perfect for hardcore editing and when coupled with Visual Studio's intellisense and code generation tools, it kicks ass.