Slashdot Mirror


Vim 7 Released

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

17 of 665 comments (clear)

  1. vim 8 will do email by Tack · · Score: 3, Informative

    A spellchecker? Now, to be fair, I'll probably find that useful. Still I can't help but feel vim is one step closer to proving jwz's law.

  2. Re:No Mac Version 7 by aardwolf64 · · Score: 4, Informative

    The link from the main MacVIM page is broken, but here is 7.0 for OSX:
    http://macvim.org/OSX/index.php

  3. Re:waiting by Nos. · · Score: 4, Informative

    Once you've learned vim, it becomes probably the fastest editor to use. Never having to use the mouse. Being able to quickly move around a document. Complex (regex) searching/replacing. It has a steep learning curve, but it a very powerful and arguably intuitive editor. I first started using it in the mid-90s when I first got onto the big unix boxes at the university I attended. Since then, I continually find myself trying to use vim syntax in different editors. Its not uncommon to see ZZ or :wq at the end of some of my emails or other documents.

  4. Re:waiting by OrangeTide · · Score: 4, Informative

    It's popular because it's like vi with some extensions to make it more modern.

    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.

    --
    “Common sense is not so common.” — Voltaire
  5. Re:waiting by Tack · · Score: 5, Informative
    I've never understood the attraction of Vim, maybe someone could explain. It seems like a throwback to keyboard command line editors with it's modal editing.
    A lot of it, I'll admit, is habit. My brain is tightly wired to vim's keyboard shortcuts (some of which are quite obscure) to the point where thinking about some action in vim is roughly equivalent to that action actually happening. I've also become accustomed to vim's slightly more esoteric features. Would other editors do the same job and be less obscure about it? Quite probably. But the truth is that vim works for me, I've already overcome the steep learning curve, and there's really very little incentive to use something else.

    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 is ubiquitous, and vim is pretty common itself. vim is usually available, and when it's not (on older unixes say) I can still apply what I know to vi to get my job done. Obviously for those who aren't sysadmin types who only use one unix, this isn't much of an argument.
    • vim is text-mode; I can shell in and use it remotely just the same as using it locally. Obviously there is a trade-off here, and any text-based editor (joe, nano, etc.) have the same advantage. But it's why I don't use gedit.
    • vim is agile and powerful. I never have to reach for a mouse (or rather, I can't reach for the mouse) so you get quite proficient at common operations. vim has features like syntax highlighting and folding that I like for coding. Any modern programmer-oriented editor does this too, but vim does it all while being fast.

    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.

  6. Re:waiting by CastrTroy · · Score: 4, Informative

    The thing that most people don't realize about VI(M), is that it works very well when using things like telnet to edit your files. There are many characters like ctrl, alt, home, and such that don't travel well over telnet. Having a program like VI(M) is great when you're accessing from a remote system, and can only use the keyboard.

    --

    Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  7. Re:waiting by AnonymousKev · · Score: 3, Informative
    I can only speak for myself. I like vi because my hands never leave the keyboard. In just a few keystrokes, I can perform actions that take an annoyingly long time with a mouse. (This is coming from a longtime Mac user). There are some tasks that I don't mind using a mouse. But when I'm writing code, I never want to go groping about for the dang mouse. For me, using vi means working much much faster.

    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.

    --
    Anonymous Kev
    Proudly posting as AC since 1997
    (Finally got a dang account in 2004)
  8. Re:Cut and Paste? by Mister+Furious · · Score: 5, Informative

    Try this: :set paste

    That should fix that problem, but it has some other weirdnesses. So, once you're done pasting set it back to nopaste: :set 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.

  9. I 3 VIM by Gunark · · Score: 5, Informative

    I'm a long-time-VIM-hater-turned-lover. I've been working with Linux systems for years, but always refused to learn my way around VIM, choosing to stick with nano instead. Why for the love of god not at least make Ctrl-C or Ctrl-Q or 'quit' or SOMETHING work???

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

  10. Re:Ahhhhh.... by stuntpope · · Score: 4, Informative

    This feature (ctrl-n auto-complete) was available in vim 6. The change in 7 is that the possibilities for completion now appear in vertical group; before, I had to press ctrl-n multiple times to cycle through the possibilities.

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

  11. Re:waiting by say · · Score: 4, 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!?!

    :syntax off (in .vimrc syntax off). Many color hints are given in :help syntax, you might wanna look. A hint could be :set background=dark.

    I'd appreciate a "strict vi mode" command

    vim -v

    --
    Roses are #FF0000, violets are #0000FF, all my base are belong to you
  12. Re:waiting by pilkul · · 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.

    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.

    :syntax off

    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.

    :set compatible

    You're welcome :).

  13. Re:waiting by GigsVT · · Score: 3, Informative

    vimtutor

    --
    I've had enough abrasive sigs. Kittens are cute and fuzzy.
  14. Re:I HATE VI. Convince me otherwise. by the_greywolf · · Score: 4, Informative
    ...does Vim do all the stuff jEdit can do?

    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.

    Line Numbering,

    :se nu or :set number

    Folding,

    there are lots of ways 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.)

    Bracket Scope Highlighting

    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.

    ... What's with search and replace across directories, etc.
    Or is it that one is expected to use other CLI tools for that?

    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/

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

    --
    grey wolf
    LET FORTRAN DIE!
  15. My knowledge of vim... by FuzzyDaddy · · Score: 3, Informative
    I've been using vi or vim in some context for over ten years. Here's what I know about it:

    Right slash to search

    Period to repeat a command

    I to insert at the beginning of the line, i to insert at the cursor

    :w to write, :q to quit, :wq to do both, :q! to quit without saving

    :23 to go to line 23

    yy to copy a line, 5yy to copy 5 lines

    dd to delete a line

    cw to change a word

    :syntax on for syntax coloring

    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!

    --
    It's not wasting time, I'm educating myself.
  16. Another Cheat Sheet by students · · Score: 3, Informative

    I saw this Quick Reference linked elsewhere on slashdot. It is less comprehensive but prettier and easier to tape to the wall because it is printer-friendly. Normally I'm not printer friendly, but who wants to start a browser just to look up Vim features?

  17. Re:waiting by grmoc · · Score: 3, Informative

    $ vimtutor
    This is an effective little program for learning basic vi/vim.