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

665 comments

  1. waiting by yagu · · Score: 4, Funny

    I'm waiting for the emacs emulation mode. (kidding, kidding)

    1. Re:waiting by quokkapox · · Score: 4, Funny
      M-x shell<enter> vim<enter>

      Creating a macro is left as an exercise to the reader.
      ^X^S
      dammit

      --
      it's a blue bright blue Saturday hey hey
    2. Re:waiting by Anonymous Coward · · Score: 3, Funny
      I'm waiting for the emacs emulation mode

      Vim now runs on more than 15 different operating systems, so I'm sure emacs can't be far behind.

    3. Re:waiting by goombah99 · · Score: 3, Interesting

      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.

      For my needs I either want a nice gui, in which case I will use kwrite, or bbedit, or some IDE.
      or I want something simple from the commandline, in which case pico is almost useful, though I prefer emacs for that. I am not an emacs power user. All I can do is do primive searches, cut and paste. But that's really all I need for quick command line edits.

      The other reason I like emacs and it's non-modal behaviour is that on a mac, those simple key bindings are available in every cocoa test window.

      So why is Vim so popular?

      --
      Some drink at the fountain of knowledge. Others just gargle.
    4. Re:waiting by wik · · Score: 0, Redundant

      Are you kidding? Emacs IS its own operating system.

      --
      / \
      \ / ASCII ribbon campaign for peace
      x
      / \
    5. Re:waiting by grazzy · · Score: 2, Insightful

      I find it easier to remember keyword shortcuts in Vim's way. Honestly, ctrl-random-char just doesnt cut it for me. Esc for command mode, and then one key. Thats all it takes. Works better with strange terminal emulations too.

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

    7. Re:waiting by Anonymous Coward · · Score: 1, Insightful

      It's all about the ePenis, son. If you have a small ePenis you need to be a Real Man. The problem is that no self-respecting Geek with a big ePenis would use something that's actually easy to use! To be a real Geek you have to memorise three thousands different cryptic and totally arbitary single character commands. How can you have any self respect if you don't know what ^:s/foo/bar/ does, or that ^:d5 deletes five lines.

      Now, do you want to be a real Geek with a big ePenis, or do you want to actually get stuff done?!?!

    8. Re:waiting by Anonymous Coward · · Score: 0

      lrn2ply nub.

    9. 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
    10. Re:waiting by BigCheese · · Score: 1

      Because it's small and it's fast and lots of us have used it so long the commands are hardwired into our nervous system.

      --
      The obscure we see eventually. The completely obvious, it seems, takes longer. - Edward R. Murrow
    11. Re:waiting by VE3MTM · · Score: 3, Funny

      And this, folks, is the sound of a joke going right over someone's head... *WHOOSH*

      --
      09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0 Whoops, silly middle mouse button...
    12. Re:waiting by Daytona955i · · Score: 1

      I think he meant an emulation mode in terms of vi emulating emacs.

      However, there are easier ways to emulate vi in emacs, namely viper.

    13. Re:waiting by Gulthek · · Score: 1

      Because you can't do really, really powerful text editing with anything else, except emacs.

      Vim Tips.

    14. Re:waiting by conJunk · · Score: 1
      I've never understood the attraction of Vim, maybe someone could explain.

      okay, i haven't read the other comments to you yet, but for me it's like this: vim is *not* my editor of choice for most things, but when i'm ssh'd into my webservers, it's the easiest, simplest way to make minor tweaks... vi .htaccess, type type type, :w :q, done and done

      it's simple and straightforward, which is all i need for tweaking .conf files and similar tasks

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

    16. 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.
    17. Re:waiting by kyofunikushimi · · Score: 1
      --
      oo
    18. 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)
    19. Re:waiting by jsveiga · · Score: 2, Insightful

      For me, it became the most used editor when I was an AIX customer support, and vi was what I could expect to find in any default installation (and most clients had only serial terminals).

      So either remotely accessing a client's system, or doing on-site support, I could always count on vi to be there. That's why when I took the holy decision between diving into vi or emacs, I picked vi.

      Now, I agree it has the most user-unfriendly interface, but once you know how to use it, it is very powerful. I still use it a LOT today, on Linux and Windows - certainlly not for making the company's catalog, but for configuration files, perl programming, html writing, comparing text files, etc.

      Learning to ride a motorcycle is (arguably) harder than learning to drive a car, but for certain jobs, the bike is better.

    20. Re:waiting by hackstraw · · Score: 2, Insightful

      So why is Vim so popular?

      For me, I don't want a GUI editor. I do to much (almost 100%) of my work over a terminal connection, and the GUI overhead is not worth anything to me. In fact, I have vi aliased to vim -X which turns off some X support. I don't remember what, but it gave me grief for some reason years ago enough to turn it off.

      Vim is way above vi. One thing I use all the time is "visual" mode, which is like selecting areas of text with a mouse and I can pipe that data through a filter, do a search and replace on that data, etc. Its a feature that came out in version 3 or maybe earlier, and I find it invaluable.

      I like a moded editor. I like infinite levels of undo. I like :q!. AFAIK, no other editor has an explicit option to "get me the hell out of here, I'm done, don't bother me about it. Thank you."

      Its hard to verbalize why I like vim because I've been using it for over 10 years now. All of my emails are composed in vim. All of my code is written in vim.

      Oh, color syntax highlighting. When I reopen a file that I opened last week, it goes exactly to the line that I left the file from last time. I can scoot from the top of the file, to the bottom, to the first comma, to the end of a line, I can do "cw", and it erases the current word and then allows me to start typing. I many times wish vi[m] keybindings were available in GUIs. It took me a couple of years to "get over it", but I still wish it exists.

      Vim is here to stay. Its one of the least buggy (I don't remember the last time I've had a bug in it actually) complex applications that I use on a daily basis.

      Its quick, dirty, and powerful. Just like me :)

    21. Re:waiting by cpghost · · Score: 1

      A few emacs key bindings would suffice for most people to feel at home. Of course, once you get the hang of writing Elisp functions, things are *much* more difficult to emulate in vi/nvi/vim...!

      --
      cpghost at Cordula's Web.
    22. Re:waiting by kuzelnik · · Score: 3, Interesting

      1. Regular expressions even more powerfull than those in pearl
      2. I can configure vim to my tastes from "out of the box" state in a couple of minutes (I was tewaking my .emacs file for years and Xemacs still felt awkward)
      3. very, very powerfull and simple way to create macros and scripts
      4. Absolutely magnificent documentation
      5. fantastic mailing list where gurus and newbies are treated very, very well. I have seen Bram himself answer very simple beginers questions.
      6. great site with hundreds of scripts, tips, and other useful stuff.
      7. Bram has accepted several of my suggestions for improving some details in documentation and even suggestion for improvement of some code (a script for gunzipping files) ((It wasn't even proper patch, because I have never created patch file))

    23. Re:waiting by jandrese · · Score: 1

      For me, the attraction of Vi (and Vim) is readily apparently when switching over to something like Visual Studio and thinking "I need to run a regular expression over this file" or "I need to move this block of text (not the whole line, just a block of it) over somewhere" or "It'd be really handy to have a quick way to select this entire block without having to reach for the mouse".

      Vi is arcane, but it's insanely powerful. Once you get used to what you can do in Vi, other editors will just feel like toys. You'll also hate that pause you get while your hand reaches for the mouse yet again.

      --

      I read the internet for the articles.
    24. Re:waiting by Anonymous Coward · · Score: 0

      You're right. Someone couldn't stand to hear the truth about their insecurity and couldn't even stand to hear you tell them that.

    25. Re:waiting by Bluesman · · Score: 2, Informative

      >And none (not even emacs) can do it with so few keystrokes (that does make the learning curve on Vi rather steep).

      Not so! That's why there's Viper.

      I was firmly on the vi side of the argument until I realized that emacs includes everything you could possibly want to edit code, including vi.

      --
      If moderation could change anything, it would be illegal.
    26. Re:waiting by Christianfreak · · Score: 1


      Because it doesn't suck
      </Troll> ;-)

      In all seriousness using Pico (within Pine) for writing email is fine, but Pico has very limited search capabilities, can't do multiple windows, has no syntax highlighting, can't do macros, can't make use of tags to jump from function calls to their declrations when writing code, can't format my code in HTML for publishing to the web, can't connect over FTP,SSH,HTTP, etc. for editing files, .... I could go on and on!

      And yes I'm sure Emacs can do all those things I mentioned above but it can't do it as fast.

      As for the key bindings ... I wish other apps used vim's

    27. Re:waiting by belmolis · · Score: 1

      I mostly use emacs but find Vim useful for a few things. I find its regular expressions easier to use than those of Emacs if things are complicated. The big thing though is that Vim's Unicode support is much better than that of Emacs.

    28. Re:waiting by PinkPanther · · Score: 1
      ssh'd into my webservers, it's the easiest, simplest way to make minor tweaks
      Then you aren't using VIM, you are using VI.

      VIM is much, much more than VI (thus the "M").

      --
      It's a simple matter of complex programming.
    29. Re:waiting by Anonymous Coward · · Score: 0
      Its not uncommon to see ZZ or :wq at the end of some of my emails or other documents.


      Whenever I have to edit a Windows config file on someone else's computer, I often open it in notepad and immidiately type about 5 'j's before I realize what I'm doing. A little embarrassing if the person happens to be there with me at the time.
    30. Re:waiting by Lord+Ender · · Score: 1

      If you admin most of your systems over SSH, you want a text editor that doesn't rely on a mouse.

      Also, common sysadmin tasks, like deleting entire lines at a time, are super-quick with vi.

      If you want to open a file, jump to line 22, delete that line, save the file, and exit, you can do that with seven key presses in vi. That rules.

      For coding, though, I NEED a visual editor that can do code collapsing and other gui-only features.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    31. Re:waiting by SCHecklerX · · Score: 1

      Add to all of that the fact that you don't need to rely on control and escape sequences, so even with a borked keymap on a foreign system, you can still edit a file to fix things!

    32. Re:waiting by MonoSynth · · Score: 1

      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.
      <Esc>uuuuuuuuuuuuuuuuuuuuuuu <Ctrl>-R <Ctrl>-R <Ctrl>-R

    33. Re:waiting by Kong+the+Medium · · Score: 1

      I second this behaviour.

      --
      ... whenever a text is transmitted, variation occurs. This is because human beings are careless, fallible, and occasiona
    34. Re:waiting by gstoddart · · Score: 1
      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.

      Because, for some of us, we've been using a vi-like editor for so long our hands are very used to running a modal editor. It's fast, and has become muscle memory after so long. vi has been my main mode of text editing for about 15+ years.

      For some of us, emacs is just a little too bloated and over-featured. And it doesn't suit our purposes.

      And, lastly, it's *really* useful to know vi as a fallback. I remember co-workers being on client site, and being kinda hosed because the client had a Solaris machine with no goodies -- if you needed to edit, it's probably going to have to be vi, since you can guarantee that's present on any machine you run across. Your emacs or whatever editor could be missin gon a stripped-down production/client machine.
      --
      Lost at C:>. Found at C.
    35. Re:waiting by Splab · · Score: 1

      One thing I really think is missing in Vim is a build in terminal buffer.

      The reason why I ended up with vim was that it was what my friends used back when I first started using unix/linux.

      I've tried learning emacs since, but my hands just aren't build for the key sequences.

    36. Re:waiting by sglane81 · · Score: 1

      For coding, though, I NEED a visual editor that can do code collapsing and other gui-only features.

      Vim can do this too. They're called folds.

      --
      This is the Internet. You can say "fuck" here. - AC
    37. Re:waiting by Obfuscant · · Score: 2, Informative
      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.

      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.

      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. (You can remove this "feature" by making an unwritable .vimrc, I've found. It can't remember where you were in a file, so you start at the beginning.)

      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.

      Yes, I appreciate the work put into vim. 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.

    38. Re:waiting by Anonymous Coward · · Score: 0
      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.

      Is the latter what you've done, or have you actually written a vi input manager for OS X? A long while ago I was planning an input manager with the most useful vi bindings, but never actually got as far as actually implementing it. I did play around with several DefaultKeyBinding schemes, though, but after a while I decided that the default emacs style bindings sucked considerably less.

    39. Re:waiting by drinkypoo · · Score: 1

      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.

      What you're missing is that gvim (the GUI version) has a simple mode that lets you run it from the GUI, and in which it is not modal. It's smaller and lighter than any other editor I've ever seen that has all the same features - assuming I'm right the gulf has widened even further with this new release.

      I use gvim as my text editor on Windows, too. I adore the syntax highlighting.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    40. Re:waiting by PGC · · Score: 3, Funny

      <Esc>uuuuuuuuuuuuuuuuuuuuuuu <Ctrl>-R <Ctrl>-R <Ctrl>-R

      Or ... faster :
      <Esc>23 u 3 <Ctrl>-R

      --
      The Dutch will inherit the earth. If not, we'll settle for a bit of ocean. Beta delenda est!
    41. Re:waiting by phraktyl · · Score: 1

      I *love* vi.

      I *hate* vim.

      There are four lines in my .vimrc file:

      set compatible
      syn off
      set ai
      set sm

      The first turns off all of the extra vim crap. And the second takes out all of the syntax highlighting.

      The other two are personal preferences. :)

      --
      Karma: Marginal (mostly due to the border around the website)
    42. Re:waiting by DoctorPepper · · Score: 1

      I had to learn vi because it was the only editor we had on our HP-9000 K class server. After a few months of using vi, (then vim on my Linux computer at home), I started to get the hang of it. I then went out and bought Steve Oualline's "Vi IMproved -- Vim" book. It was great. I learned quite a lot about vim, and now use it as my main editor on all my platforms, including my Mac and my Windows machines.

      Like some of these other folks have said, once you get the hang of vim, it becomes an incredibly powerful editor. I've been able to do things in vim in just a few keystrokes that would have normally required the creation of a Perl or Python script to accomplish.

      Besides, have you ever tried to use a GUI editor over a dial-up connection to a Unix box located somewhere else in the world? What I've learned is that the only editor you can count on being installed on pretty much any version of Unix/Linux is vi. If you know vim, you can get by in vi.

      --

      No matter where you go... there you are.
    43. 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
    44. Re:waiting by swg101 · · Score: 1

      Actually, on my computer...
      ]$ which vi
      /usr/bin/vi
      ]$ ll /usr/bin/vi
      lrwxrwxrwx 1 root root 21 Jul 14 2004 /usr/bin/vi -> /usr/bin/vim-enhanced


      ...which is common on many modern Linux distros.

      --
      Like pi? Try 10,000 digits.
    45. Re:waiting by rainman_bc · · Score: 1

      Add to all of that the fact that you don't need to rely on control and escape sequences,

      Is there another way to do what ctrl-f and ctrl-g do in vim? AFAIK there's still some control sequences to remember too. And sometimes it's a bit illogical why it's a control sequence and not just a single key command.

      That said, I use vim and like it, and this is great news... But it's isn't necessarily the cat's ass.

      --
      09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0
    46. Re:waiting by alexhs · · Score: 1

      vim can be a real surprise when it drops you somewhere into the middle of a file instead of row 1 column 1

      Are you using Redhat / Fedora Core ? I've seen that behaviour on Redhat, but it isn't the default on Debian (colorization neither btw). Don't blame vim, it's just some distros having strange default configurations for it ;)

      I'd appreciate a "strict vi mode"

      I guess it's possible... [checking] vi -C should do that. [testing] Well, doesn't seem to work...
      There's a "set nocompatible" in vimrc, but removing it might not be sufficient, the simple presence of a vimrc file is sufficient for vim to be non vi compatible.

      And there's also nvi.

      --
      I have discovered a truly marvelous proof of killer sig, which this margin is too narrow to contain.
    47. Re:waiting by fbjon · · Score: 3, Insightful

      Since when has ctrl not travelled well over telnet/ssh? Typing e.g. Ctrl-X means you send a control code of the low-ascii kind.

      --
      True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
    48. 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 :).

    49. Re:waiting by Obfuscant · · Score: 1
      I'll bite. A little enlightenment on vim can't hurt.

      Yes. I tried finding this stuff in the manuals, but no luck.

      Well, almost every text editor and word processor in the world has this.

      I don't use almost every text editor and word processor. I use 'vi'. My fingers learned a long time ago that to undo the accidental 'u' (right next to 'i' for insert) one just does another 'u'. With 'vim', this leaves you TWO steps back.

      set viminfo='0 in .vimrc.

      THAT is certainly not intuitive, but it does solve the "start somewhere in the middle of the file" problem. Thanks.

      vim -v

      Nope. Just tried the undo's, and it doesn't change the behaviour. The winner is phraktyl (92649) with "set compatible".

      Thanks to both of you for the solutions.

    50. Re:waiting by Atzanteol · · Score: 1

      It's futile really. Like explaining a joke to somebody who just "doesn't get it" I can't tell you why I like Vim. You don't, that's cool. Use something else.

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    51. Re:waiting by sp0rk173 · · Score: 1

      well he was referring to a broken keymap, where ctrl might not be ctrl. in that case, if you're in emacs, you're pretty much screwed. I personally find :wq less of a strain then the analogous escape squences (which i forget, since i haven't used emacs since about a month after i learned how to use it).

    52. Re:waiting by sglider · · Score: 1

      So how do I learn Vim? Please don't say, 'use it'. I'm wondering if there is a resource for commands ?

      --
      War isn't about who's right. It's about who's left.
    53. Re:waiting by cloak42 · · Score: 1

      Actually, it's :d5d that deletes five lines. :)

      You know, it's funny, but I originally hated vi/vim. I thought like you did, that it was far too complex and too hard to remember things. But I forced myself to use it, mainly because it's the editor that just about every Unix machine has, and when I need to log into one for my job, it's nice to know that I have an editor right at my fingertips.

      I used to use Pico (from the PINE suite) because it was easy, had all of the commands in front of you on the screen, and could use the arrow keys. But the more that I used vi, the more I realized that it actually isn't counterintuitive at all. I find myself doing things using vi without thinking that I had a great deal of trouble with when I first started using it. It just seems to make sense, now.

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

      vimtutor

      --
      I've had enough abrasive sigs. Kittens are cute and fuzzy.
    55. Re:waiting by localman · · Score: 1

      For me it's all about the home row. I don't need to move my hands out of position at all when using vi. And I can manipulate huge chunks of code as such. I don't think you've truly experienced it until you get used to "hjkl" instead of the cursor keys. And there's just so many power-user commands. And vim is just the most fully featured version of vi.

      Oh, and pico breaks lines (a total no-no when coding) unless you add -w. It's more a word processor than a coders editor. No powerful formatting commands either.

      I've seem some impressive emacs works, so no argument that emacs is a great coder's editor.

      I like to say "vi is like playing a text-based video game that just happens to result in code".

      Cheers.

    56. Re:waiting by plalonde2 · · Score: 1
      That was my argument for Vi forever. It's now my #2 editor. Instead I use Acme, Rob Pike's editor from Plan9. Tiled windows, click-to-type. No cursor keys, not keyboard shortcuts. But there are a few wins. It really *uses* the mouse. Left click to point or select, right click to "find" where find means opening a file at a give line, or find the text under the mouse in the current file, run through an external processor (the plumber) that lets you write handling rules ( pointing to a word like open(2) recognizes it's a man page, and opens it in a new window). And the middle button executes text. Any text. Anywhere. And by execute that includes editor commands (Get, Put, Look, Snarf, Paste...) as well as external commands (grep, wc, make, etc). You can chord the commands to pass another text selection as a parameter. Button 1 chording makes copy and paste trivial - no keystroke involved.

      It took me a couple of weeks to get used to it, but I don't ever want to go back to an editor that doesn't let me turn any random piece of text on my screen into executable functions at a touch.

      But it's hard to convince people the mouse is worth it :-)

    57. Re:waiting by colmore · · Score: 1

      guis are easy to learn, but they aren't fast.

      do you select edit->copy and edit->paste every time? of course not. you use keyboard shortcuts.

      while it might take a week of peeking at a cheatsheet, once you learn vim, it's very very fast. you can change bash to work like vim, there are vim modes for editing, vim's about a million times easier to script than emacs (by which i mean, you don't have to learn lisp.) it's fast & small, and available for everything. it's on every unix terminal (except basic gentoo installs i think) so you're never without it. and the depth of its power features go way beyond what a combination of menus and taskbars can do.

      all that said, the learning curve is steep, and if you don't spend 8-18 hours a day writing code and jumping around 50 file source trees, it's probably not going to be your thing. Me, my desktop has a HUGE gvim session loaded with custom scripts and about 8 frames (tabbed editing in vim 7 will be a godsend) more often than any other application.

      vim rocks! use it and love it!

      --
      In Capitalist America, bank robs you!
    58. Re:waiting by Anonymous Coward · · Score: 3, Insightful
      for editor in "$editors"; do

      echo "Once you've learned ${editor}, 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 ${some_time_ago} when I first got onto ${some_machines} at ${some_place}. Since then, I continually find myself trying to use ${editor} syntax in different editors. Its not uncommon to see ${popular_sequence} at the end of some of my emails or other documents."

      done

      Personally I use a number of editors depending on the machine I'm using and whatever it is I need to edit at some particular moment. The list goes something like emacs, vim, gedit, nano, and then whatever editing mode is available in IDEs I have to use, such as MonoDevelop.

      I understand that people might feel compelled to promote the use of their favourite editor(s), but in all honesty it never ceases to amuse me how some people have the charming naiveness to confidently declare to the world things like "once you learn it, $my_editor is probably the fastest editor to use". It reminds me of a nice interview with Rob Pike where, presented with the stupid question "Emacs or Vi?", he replied:

      [..] I don't expect any Slashdot readers to switch editors after reading these papers [..], but I think it's worth reading about them to see that there are ways of editing - and working - that span a much larger gamut than is captured by the question, 'Emacs or vi?'
    59. Re:waiting by joggle · · Score: 1

      There's some UNIX books that you could check out from a library that have good instruction on how to use vi. That's how I learned.

    60. Re:waiting by theonetruekeebler · · Score: 1
      Learning to ride a motorcycle is (arguably) harder than learning to drive a car, but for certain jobs, the bike is better.

      Not necessarily better, but certainly more rewarding. In rec.motorcycles a few years ago, it was pointed out that there are only three things motorcycles do better than cars:

      1. Accelerate,
      2. Fit into small spaces, and
      3. Fall over.

      So I guess I agree with you: I've been dealing with the luxury-SUV called Eclipse at work. It's comfy, amenity-ridden, and hauls an entire project in one cumbersome load. But it doesn't steer or brake, and its features keep getting in the way when I know what I'm doing. So I've been finding more and more excuses to use vim. Its zippiness has been a blast.

      --
      This is not my sandwich.
    61. Re:waiting by Anonymous Coward · · Score: 0

      try CTRL-], then type quit...

    62. Re:waiting by buswolley · · Score: 1

      Have you heard of google?

      --

      A Good Troll is better than a Bad Human.

    63. Re:waiting by Anonymous Coward · · Score: 0

      Once you've learned vim, it becomes probably the fastest editor to use.

      Evidence? Have you used all editors?

      Never having to use the mouse.

      Sounds like every other editor in the world.

      Being able to quickly move around a document.

      Again, how is this unique?

      Complex (regex) searching/replacing.

      I can't speak for all editors, but Emacs has had this for ages.

      It has a steep learning curve, but it a very powerful and arguably intuitive editor.

      Isn't "intuitive" the *opposite* of "steep learning curve"? (Peopleware calls this "lying by repeated assertion.")

      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.

      That's nice, but it still doesn't explain why you think Vim is better than, say, Emacs, except that you happen to use it.

    64. Re:waiting by SIGFPE · · Score: 1

      I don't work over a terminal. I don't use a machine with no GUI facilities. I'm not an old hippie hacker from the seventies. But I still think vim is a better editor than any other out there. And the attraction is simple to explain: it takes fewer keystrokes to get stuff done in vi than with any other editor I know. When you edit you are typically either inserting text, or performing some kind of higher order operation like search or cut-and-paste. So it makes perfect sense to have a modal editor rather than one where you need to signal a higher order operation with some funky key combination.

      Incidentally I was an emacs user 10 years ago. But emacs, out of the box, is unusable. Even after a couple of years of maintaining my own .emacs file there were still useful commands that were many keystrokes away and which required me to write yet another key-binding for. I tried using vi-emulation mode in emacs but that was pretty awful.

      So I'm stuck with vi, with all of its ugly quirks and inconsistencies. As Winston Chrurchill's geeky nephew said, vi is the worst editor ever written, except all the others.

      --
      -- SIGFPE
    65. Re:waiting by Anonymous Coward · · Score: 0

      What a treat for text to show up as dark blue on black when you've set your xterm colors to white on black.

      If you just have a problem with the choice of colors... How about :set bg=dark ? That's not too tough.

    66. Re:waiting by Anonymous Coward · · Score: 0

      !v
      <bozo> *damn*
      <fn> "if you were in emacs, you'd be editing by now."

      Stolen from http://bash.org/?6027

    67. Re:waiting by laughing+rabbit · · Score: 1
      --
      No incumbents, not no where, not no how.
      Vote them out every term.
    68. Re:waiting by tender-matser · · Score: 1

      no need for 'set sm' :)
      the '%' command is just fine.

    69. Re:waiting by coldmist · · Score: 1

      Try Visual SlickEdit. It has a Vi keybinding set built in. A lot of software guys here where I work use it. The guys on unix just use vim (including myself).

      --
      Don't steal. The government hates competition.
    70. Re:waiting by David_W · · Score: 1
      http://www.oreilly.com/catalog/vi6/

      Seconded. This was how I learned VI, and I found it invaluable. From there you can use the VIM help files to pick up on the improvements over vanilla VI.

    71. Re:waiting by RLiegh · · Score: 5, Funny

      >Have you heard of google?
      Nope. What can you tell me about it?

    72. Re:waiting by RLiegh · · Score: 1

      >I'd appreciate a "strict vi mode" command

      `which nvi`||sudo apt-get install nvi ;)

    73. Re:waiting by RLiegh · · Score: 1

      >It's kindof like the Windows vs. UNIX argument. However, once you go UNIX, you never go back.

      Especially once you've seen KDE--hey! wait just a cotton-pickin' minute here!

    74. Re:waiting by Anonymous Coward · · Score: 0

      That sounds like a LOT of bloat

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

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

    76. Re:waiting by ozbird · · Score: 1

      Try Visual SlickEdit. It has a Vi keybinding set built in.

      And the obvious answer: gvim. I personally use the console version of vim because I don't need the GUI under Linux/Unix, but having gvim on Windows makes life easier when I have to deal with than OS.

    77. Re:waiting by SquadBoy · · Score: 1

      Yeah. Do that on a 28.8 baud connection to an ancient HP-UX box. :)

      Yes, I *know* you can vi. But far far too many people forget that it's well worth learning and using on a regular basis because it's *everywhere*.

      --

      Cypherpunks: Civil Liberty Through Complex Mathematics. Those who live by the sword die by the arrow.
    78. Re:waiting by mdaniel · · Score: 1

      I'll see your the sibling posts, and raise you a "keyboard layout" notion.

      I first switched over to vim (after years as an *emacs-er) when my hands caught fire and I switched to the Dvorak keyboard layout.

      Now that the X and C characters are nowhere near one another, it makes all those "cute" macros damn hard to execute.

      One of the [almost infinite] reasons I prefer vim because it is kb layout agnostic.

          -- /v\atthew

    79. Re:waiting by kfg · · Score: 2, Insightful

      I might add the caveat that you have be a "real" touch typist to appreciate and be able to fully "unlock" the power of vim.

      Hunt and Peckers and "half and halfers" may not be able to utilize vim to it's full potential, and thus not actually realize any benefit from using it.

      Please forgive me, however, if I suggest to these people that the solution is to "learn to type." :)

      KFG

    80. Re:waiting by jazman · · Score: 1

      Speed and efficiency. I demonstrated the difference in editors at a course once (I was a student), we had this poxy slow text editor which was probably fine for what it was designed for, but as a fast efficient editor it was completely useless. As an example I showed the behaviour of each doing a global search and replace of spaces to dots (at the time it was relevant for some reason). The course editor did a highlight - wait - swap - highlight - wait - swap cycle, probably replacing 1-2 spaces a second, very pretty, but extremely boring after the first few and certainly not something you'd want to do regularly or on large files. vi (not actually vim of course) took an admittedly cryptic something like :1$s/ /./g (I use emacs these days (Altxrepl s Enter.Enter) so my vi's a bit rusty) - done in subsecond time. vi is cryptic when you see the commands written out like that but it's not really that much more cryptic than AltER Tab.Enter (Windows notepad), the only difference with the latter is that the commands are drawn out on the screen taking up valuable screen space away from code instead of the vi commands which are on that quick reference card stuck to the side of the monitor.

    81. Re:waiting by Stephen+Gilbert · · Score: 1

      I *love* vi.

      I *hate* vim.

      So why not use nvi?

    82. Re:waiting by painQuin · · Score: 0

      can't reach for the mouse? I hope you don't mean you don't know how to turn the mouse on..
      set mouse=a

      and just in case it's -not- common knowledge, you can still hold shift to do selection and pasting involving the regular clipboard (for copying outside of the terminal window, perhaps?)

      --
      A guilty conscience means at least you've got one.
    83. Re:waiting by marct22 · · Score: 1
      It's faster because vi is faster than all other editors once you learned to master it. You can fly, maneuvering through text quite easily, no need to even stretch the fingers for hitting the function keys, rarely needing to hold the control key down (save for generating stuff like ^Ms (Ctrl-V Ctrl-M) or other control characters, quick and easy regular expression support, most everything in easy reach of the fingers, etc. Hitting the escape key (yes, it's a stretch for the left-pinky) becomes quite easy, as it's pretty much the only key you gotta stretch for, but that's easy too once you get in the habit, and the keys are pretty much in the same spots on different keyboards.

      emacs has it's uses, but once you get to know vi, it's frustrating to use other editors like kedit, textpad, and especially notepad. It's great to quickly edit files without having to load a full IDE. Emacs has it's uses, it can handle longer lines than vi/vim. But it's rare when you run into that situation.

      Plus, if you are bouncing from job to job, you never know if at one job you'll be on unix, another on windows, and rather than re-learning yet another text editor, you can always install vim for windows, and vi is pretty much always on unix. No need to configure xterm, no waiting for the GUI start/refresh.

    84. Re:waiting by plalonde2 · · Score: 1

      Acme was designed to run on old serial-line bit-blit terminals. It's incredibly conservative with it's redraw bandwidth... Crispest editor I've ever used.

    85. Re:waiting by Peaker · · Score: 1

      Yeah. Esc-char-esc is much better than Ctrl-char :-)

    86. Re:waiting by Anonymous Coward · · Score: 0

      So why is Vim so popular?

      To many people, that's like asking "why is breathing so popular?"

      Vi has been around since the dark ages. When you sat down at a Unix terminal, vi was just assumed to be there as much as any other utility. So one reason is that it's always just "been there", and true-blue Unix old-timers have simply always used it. Personally, I consider mastery of vi (or Vim) a rite of passage for being called a Unix geek or hacker. It's actually very simple to use; people just get confused by simplicity these days. Go figure.

      One reason I prefer it over Emacs is that I *HATE* using Control/Meta+key. It slows me down and is cumbersome, and prone to mistakes. In Vim, everything is done with your fingers over the keyboard in normal typing position. Save the file? :w Quit? :q Save and quit? :wq Search for text? / The basics are so simple even granny could do it.

      Another reason is the sheer text editing kungfu power at your fingertips. People use Vim when they graduate far beyond the all-i-need-to-do-is-copy-and-paste mindset. Trying to use Notepad, for example, after years of Vim is painful. I usually find myself doing everything imaginable except copy and paste. Vim can even provide you with startling revelations... :h 42

    87. Re:waiting by Peaker · · Score: 1

      Its pretty easy to configure the keys you want in emacs.

      Not sure how easy it is in vim.

      There's some weird vim language to extend it no? Emacs has ELisp which is a nasty Lisp (yech) but still usable for actual extension work...

      Emacs has very powerful macro recording that can contain invocations of your elisp routines, and any of the vast amounts of emacs's commands. It is the power of a computer program, but programming by example - which is so much more productive than writing the program as abstract text.

    88. Re:waiting by Julian+Morrison · · Score: 1

      For reference, I got into unix when there were already a lot of good editors, including nedit (probably my second favouite).

      My discovery process went much like this (over a longer time, of course):

      How can I do complicated stuff fast? This is a computer, it ought to be able to automate. (Rule out all the "small, fast" editors like joe and pico, as well as the vast majority of graphical shit. Regex searching is not "fully automated", assholes.)

      WTF, evil random keybindings? WTF, no control-whatsit key for simple repeat previous search? I have to type this in longhand each time? Menus with no key equivalent? Ork-skin ui? Antique dialect of lisp? Frickin' built in kitchen sink? (Rule out emacs, kerplunk.)

      Hmm, graphical, can do loads with the mouse, pretty highlighting, fairly automatable. Motif sucks bilious goat ass. Nice enough, but what about console? (Rule in nedit, barely, but fer fricks sake, ditch motif for the 21st century!!!)

      Gah, how do I exit this? I can't understand it? Oh, "a" or "i" is to type? and escape to command? Hmm. Oh nice, it understands my windowsy keybindings in edit mode. *reads manual* Whoah, it does that? *learns about "." command* Well blow me down, automation at a keypress. Hmm, it understands all my unixy standard keybindings like "/" to search. Navigation commands, me likey. WTF, it has a graphical mode too? And fast? highlighting? Whoohoo! (Rule in vim, preced by a parade and virgins strewing flowers.)

    89. Re:waiting by kfg · · Score: 2, Insightful

      >>Never having to use the mouse.
      >>
      >Sounds like every other editor in the world.
      >
      >>Being able to quickly move around a document.
      >>
      >Again, how is this unique?

      It isn't, but, as per my other post in this thread, it is unique in that its keyboard command sequences are optimzed for true touch typists, so once you learn them you can work at whatever your typing speed is, assuming that you think that fast (or type that slowly I guess).

      Isn't "intuitive" the *opposite* of "steep learning curve"? (Peopleware calls this "lying by repeated assertion.")

      Well, yes, but bearing in mind that calling anything but the nipple an "intuitive" interface is lying by repeated assertion. You even had to learn that your hands were good for something other than grabbing the tit. You just did it so long ago that it feels intuitive to pick something up.

      The only way software can be "intuitive" is by mimicing some already learned skill. Sometimes, however, this already learned skill can be inappropriate for a piece of software, like "knobs" that have to be "turned" with the mouse pointer.

      vi/m is "intuitive" (even though the commands themselves are not) to a trained touch typist, because it is, as per above, optimized for that already learned skill. The command sequences, although needing to be learned, are not entirely arbitrary.

      However, to a nontouch typist they are, because such a typist does not share the same skill set and reference plane. For vi/m to be "intutive" touch typing has to first be "intuitive."

      Which means you have to first spend a lot of time learning to touch type.

      KFG

    90. Re:waiting by chud67 · · Score: 2, Insightful

      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.

      Agreed. If you ever want to see a thing of beauty, look over the shoulder of a very experienced Vim user and watch how they unconsciously use the key combinations and edit files at near light speed; it will inspire you to learn Vim in earnest.

    91. Re:waiting by kfg · · Score: 1

      And as you can see from this and a number of other posts I've made in the past few days, my touch typing needs some work. Yeah, I know, there's that "Preview" thingy, but that would require removing my hands from home base.

      KFG

    92. Re:waiting by whoisjoe · · Score: 1

      It's designed not only for keyboard-only operation (i.e., your hands are not leaving the keyboard), but also to keep your fingers on the home row of the keyboard (at least for qwerty operation). That contributes to the speed of operation (once you get used to all the keystrokes, of course).

    93. Re:waiting by kfg · · Score: 1

      >Have you heard of google?
      >
      >>Nope. What can you tell me about it?

      Jeezum Crow, Dude. Google it yourself.

      KFG

    94. Re:waiting by kellyb9 · · Score: 1

      I always thought it had something to do with picking up chicks with your mad computer skills.

      But honestly, I never understood the attraction to vim or vi until reading this forum today. And I guess, it makes a lot of sense, however growing up in the windows environment, I like pico... A LOT.

      ZZ

    95. Re:waiting by Pete · · Score: 1
      Of course, once you get the hang of writing Elisp functions, things are *much* more difficult to emulate in vi/nvi/vim...!

      Not for very much longer... :)

    96. Re:waiting by grazzy · · Score: 1

      esc then char. ctrl+char. see the diff?

    97. Re:waiting by Anonymous Coward · · Score: 0

      vim is supported on many different os' as well, I can use vim on windows and then use it on my unix boxe's and its exactly the same i have 1 text editor for all my platforms.

    98. Re:waiting by Anonymous Coward · · Score: 0

      And yes I'm sure Emacs can do all those things I mentioned above but it can't do it as fast.

      Sure it can. It's just what you're used to.

    99. Re:waiting by Anonymous Coward · · Score: 0

      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.

      So, pretty much like other editors.

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

      Modal behavior *is* a throwback. If anybody thought this was good design, then why don't all apps have strict edit/view modal behavior?

      And "few keystrokes" is a lousy metric. To measure things that way assumes that each keystroke takes the same amount of time. If that was true, we'd all be programming in APL and TECO. The truth is (and several experimental studies have shown) that when you make single keystrokes do a lot, you're not saving time, but merely offloading processing from the mouse (or wherever) into the poor user's brain.

      The benefit is that because your brain is occupied, you *think* you're going faster, even when the stopwatch says you're not.

      Then again, I find vi (and clones) impossible to use, because its keybindings are Sholes-specific. If you're using a Dvorak keyboard layout, the movement keys make no sense (as opposed to even Emacs, where they still do).

    100. Re:waiting by Eideewt · · Score: 2, Informative

      Vim is one of the fastest editors I've used. I haven't used them all, but I have used Vim, Emacs, ed, notepad and its ilk, and Sam. Its first big strength is that instead of hitting your down arrow twenty times then doing the same with the right arrow, for example, you can navigate to the same spot with five keypresses or so. "20j5w" would take you down 20 lines and forward five words. Compare that to the hold a key and wait that's commonplace in other editors, or the alternative, which is to fumble for the mouse and attempt to line up your cursor with a tiny row of text then attempt to click between the correct pair of letters. Vim takes away the wait between thinking and acting. It takes a single keypress to start appending a line. It takes two to delete or copy a line, and adding a number before that will extend it to take as many lines as you please. The thing that limits your speed most is deciding what to do.

      Vim is my first choice for any quick edits. When coding, I like to have the comforting weight of Emacs behind me, but there's no way it's as fast as vim. Maybe it could be almost as fast if you got really quick with c-u.

    101. Re:waiting by OrangeTide · · Score: 1

      Viper isn't emacs. It runs in emacs. because emacs is it's own little operating system.

      --
      “Common sense is not so common.” — Voltaire
    102. Re:waiting by OrangeTide · · Score: 1

      I turn all that crap off in my .vimrc .. drives me nuts. (some systems I use have /bin/vi linked to /usr/bin/vim)

      I can barely see that dark blue on black text that is default in so many syntax highlightings. my xterm is tweaked so I can at least sort of read it. but I'm happier with it off.

      I do like % gg # [[ ]] [] ][ and stuff like that when editing source code though.

      --
      “Common sense is not so common.” — Voltaire
    103. Re:waiting by drsquare · · Score: 1

      Once you learn the shortcuts, it becomes second nature to quickly fly around documents, without your fingers having to leave the keyboard.

      It's much quicker and simpler than a bloated IDE or emacs.

    104. Re:waiting by OrangeTide · · Score: 1

      If you build vim yourself that's what the defaults are actually. You're free to edit the site or local config files. I usually copy my personal .vimrc into the site ones so other users can have some reasonable defaults.

      --
      “Common sense is not so common.” — Voltaire
    105. Re:waiting by toneh · · Score: 1

      1: VIM is amazing for editing code. It's got a beautiful plugin system, built
      upon a scripting language which got closer to perfection in VIM7. That makes
      it so that, as emacs, it has special modes designed for your favourite languages.

      2: VIM is highly customizeable in the coding sense; its designers have considered
      every possible preference a programmer might have wrt indentation, for instance,
      and documented them so that it's a lesson for anyone to read about it in the docs.

      3: VIM is highly customizeable in the interface sense. You can bind the combinations
      you want to do the things you want in the modes you want.

      3: VIM customization is highly documented. VIM is arguably the best FLOSS project
      wrt documentation. That's a great example for other FLOSS projects to follow.

      4: You can study VIM for years, and it will still amaze you from time to time with
      a special feature/option. It's got an incredible, I mean, incredible, amount of
      functionality, and it's such a lean program... to the point where comparing it to
      vi is almost outrageous. People, we're on the age of VIM. vi is a dinossaur.

      Really, you can't tell from the outside how great VIM is. I probably know VIM better
      than 90% of the users I know, and it still impresses me. You need to use it to
      understand. And the drive to use it comes from seing someone use it and edit code
      so fast that you can't follow, with the core commands for moving around, and the
      registers, and visual modes.. not everyone can foresee how good it is without that,
      because it is HARD to get into. But a lot of people, me included, will say it's worth
      it.

      Regards

    106. Re:waiting by OrangeTide · · Score: 1

      Nearly all applications do have modal behavior, in the stricted sense of the word. They just aren't modal centric. The selection/marking in vi is not modal, unlike emacs, vim, notepad, visual studio, etc.

      I don't like using the mouse, switching back and forth gives my wrist pains. And holding down 2-3 keys for emacs isn't much fun for my hands either.

      There isn't really a problem (studies have shown) between a very simple modal interface and a non-modal interface. our brains can transparently handle the very primative modal system vi has, it's not unlike modes in a natural language. "the boy picked up a white truck". was the truck white, the boy or both. that's not unlike understanding that 'dj' means delete down. it's a matter of aquiring the vocabulary for your keyboard. luckily the meaning of the keys are pretty consistant in vi mode.

      the ex mode (: line) for doing things in vi is where the bad interface starts. the commands are not identical to the normal modal commands. I've been using vi for a decade and I have to look up the more exotic text processing commands. (beyond something like search and replace and swap the position of the patterns). i think we'd be better served if it was more like 'awk' and less like 'sed'. this is how emacs does it, giving you a little programming language to do the fancy stuff in, then you just bind them to keys if you use them a lot or just give them a function name if you use them only occationally.

      --
      “Common sense is not so common.” — Voltaire
    107. Re:waiting by tengwar · · Score: 1

      arguably intuitive editor
      Errm, you might want to check on the definition of "intuitive". I'd dread to meet someone who could immediately use vi without any tuition!

    108. Re:waiting by dlbornke · · Score: 1

      I started with Emacs because it recommended by a friend.

      However: Configuring Emacs is so damn difficult that I switched to vim ... configuring is saving the stuff you usually do in command mode and therefore know anyhows.

      Vim is the best editor I know for all editing but docbook (and probably other complex XML/SGML DTSs) ... Emacs beats it hands down in this area. It's the only time when I sit down and try to remember the Emacs shortcuts again (which are not that hard).

    109. Re:waiting by dlbornke · · Score: 1

      > Which means you have to first spend a lot of time learning to touch type. Before writing a long text, do all of the lessons of ahref=http://ktouch.sourceforge.net/rel=url2html-2 9864http://ktouch.sourceforge.net/> and write the text with trying only to touch type ... takes roughly two weeks to gain your old speed ... taks half a year to tell everybody how worth the time is to learn touch type :)

    110. Re:waiting by Anonymous Coward · · Score: 0

      Because it's on every damned unix machine in the entire world, while your favorite editor probably isn't.

    111. Re:waiting by coma_bug · · Score: 1

      Nope. What can you tell me about it?

      Google Is Your Friend.

    112. Re:waiting by Kehvarl · · Score: 2, Funny


      >Have you heard of google?
      Nope. What can you tell me about it?


      It's a fully featured calculator, email, calendar, and chat system. Oh, it does searches too.
      It's really rather like emacs in that, someday, it may even get its own text editor.

    113. Re:waiting by olego · · Score: 1

      I dislike vim for the simple reason that I have a Dvorak keyboard, and having to press HJKL to move around is one of the most unintuitive things ever. :-D

    114. Re:waiting by eonlabs · · Score: 1

      And people are using Word why?

      --
      I wouldn't consider the mad hatter mad. Just reality impaired. He sure can make a mean cup of tea.
    115. Re:waiting by Anonymous Coward · · Score: 0

      and several experimental studies have shown

      Link to the studies to provide proof, or don't even make such a claim.

    116. Re:waiting by SoloFlyer2 · · Score: 1

      vi/emacs is a bit like a racing game the default most intuitive layout isnt the best

      Accelerate - Up Arrow
      Break - Down Arrow
      Left - Left Arrow
      Right - Right Arrow
      Gear Up - A
      Gear Down - Z

      ok so thats easy to learn and really intiuitive... BUT

      Accelerate - F
      Break - D
      Left - J
      Right - L
      Gear Up - I
      Gear Down - K

      Driving using those keys while harder to learn is much faster and allows more flexability... other keys on the keyboard are also more accessable allowing for things like view changes and Nos etc

      --
      "I reject your reality, and substitute my own" - Adam Savage
    117. Re:waiting by Mr.+Jaggers · · Score: 1

      Sure thing! Wikipedia knows all about Google! Try:

      http://en.wikipedia.org/wiki/Google

      You can also learn about Vim!

      http://en.wikipedia.org/wiki/Vim_(text_editor)

      You can also learn about Wikipedia!

      http://en.wikipedia.org/wiki/Wikipedia

      Note, you do need internet world wide web browsing software to access these addresses (I suggest firefox). Google for 'download firefox' to get a copy!

      --

      When I grow up, I want to have Christopher Walken hair.
    118. Re:waiting by Anonymous Coward · · Score: 0

      that's funny all these other ppl seem to be doing a fine job of just that.

      no one wants to be in your fake 1337 c1ub anyway.

    119. Re:waiting by owlstead · · Score: 1

      I think he meant that he wants to have VIM *anywhere* in the (G)UI, not so much as a seperate editor. Say, for instance, in the slashdot comment box. I know that for the Eclipse (development) environment there is a VI top layer plugin. Maybe you could program it in some sort of OS macro (select all, copy, switch to program, create new buffer, paste, change text and do the same stuff the other way around. As long as it's in insert mode by default, it's fine by me.

    120. Re:waiting by Pseudonym · · Score: 1

      I hear what you're saying, but I have one proviso. There are a number of very decent modern cross-platform editors (Vim and Emacs being but two). Whatever editor you decide on, you spend most of your programming career in it, so you need to learn to use it well. This will pay off much, much more than being passingly familiar with a dozen editors.

      (Disclaimer: Sure, passing familiarity has its uses. At the very least, learning how to get to and navigate the documentation for any editor you're likely to come into contact with will help you avoid getting lost.)

      --
      sub f{($f)=@_;print"$f(q{$f});";}f(q{sub f{($f)=@_;print"$f(q{$f});";}f});
    121. Re:waiting by doubtless · · Score: 1

      Its quick, dirty, and powerful. Just like me :)

      Personally, I don't want to be quick when I'm feeling dirty and powerful.

      --
      geek page at KY speaks
    122. Re:waiting by zapadoo · · Score: 1

      You know you've become a vim addict when you try to ESC Y p to copy and paste a line in a /. comment box.

      Fortunately you can have your stinkin' html textarea AND vim too. Mozex adds a popup menu to Mozilla variants including Firefox and Seamonkey that 'sends' the text area to vim, and a :wq and revisit of the textarea updates same. Very neat. Never make another speeling mistake again ;-)

      http://mozex.mozdev.org/

    123. Re:waiting by Lillesvin · · Score: 1

      [...] I prefer emacs for that [simple editing]. I am not an emacs power user. All I can do is do primive searches, cut and paste. But that's really all I need for quick command line edits. (Emphasis mine.)

      Something's wrong here... :-p Why VIM you ask? Apparently you haven't tried starting Emacs on a 633 MHz Pentium Celeron with only 128 MB of RAM. :-p

      Seriously though... For dead-simple editing, like you mention, I think Pico or Nano is fine. If you want a little more control I'd suggest VIM, since it appears to me as somewhat lighter on the system resources than Emacs. Both have a steep learning curve, so in that respect I wouldn't recommend one over the other - it's just different ways of doing things. I went from Pico to Emacs and ended up at VIM, since it was most appealing to me.

      I'm not here to start a flame-war or anything, so if I'm dead wrong about the speed, I'm sorry. I'm only speaking from my own experience - I haven't made benchmarks or anything. Maybe Emacs can be configured to start up just as fast (or faster) than VIM.

      --
      "Live free or don't."
    124. Re:waiting by jZnat · · Score: 1

      Okay, I use vim religiously, and I also feel impaired when using other editors (e.g. Kate, this textarea, Thunderbird, whatever). I don't know how fast I look when I'm using it, but to the experienced vim user, I'm sure you don't notice how fast you work until you try to do something in a different non-vi editor (e.g. random "jjjjjjjj"s and "kkkkkk"s and h's and l's and what have you where you're "supposed" to be using the arrows). It's a good thing programs like less(1) and even Konqueror allow you to use j and k for scrolling.

      --
      'Yes, firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
    125. Re:waiting by Anonymous Coward · · Score: 0

      woosh++

    126. Re:waiting by Jackmn · · Score: 1
      but in all honesty it never ceases to amuse me how some people have the charming naiveness to confidently declare to the world things like "once you learn it, $my_editor is probably the fastest editor to use"
      In the case of Vim it is correct, with the possible exception of Teco. Vim lets you get a great deal done with very few key strokes - far fewer than any other editor I can think of.
    127. Re:waiting by Requiem18th · · Score: 1

      I hate vim and emacs for not using a CUA) interfase by default, or at least include a well documented quick switch to CUA.

      What is the faster way of deleting 4 words? In vim its just Esc-d4w and fighting against years of muscle memory used to ctrl+shift+arrow their way around.

      I tried cream for vim but it only works in the graphical display and then again many things were just too hard. Want to disable regexp? hit 3 buttons to toggle that single setting. Want to search a word? don't forget to hit tab every time since the ok doesn't have auto focus.

      So currently the best terminal editor i've used is "ne" for regular text and mcedit for code, but then again i rather use X.

      --
      But... the future refused to change.
    128. Re:waiting by p2sam · · Score: 1

      I use 'screen' the terminal multiplexor.

      http://www.gnu.org/software/screen/

      that way, I can quickly go from file navigation, script writing, compilation, and web surfing, all from within the same xterm.

    129. Re:waiting by Aquila+Deus · · Score: 1

      emacs is hard to learn/configure for advanced features, such as class browsing, auto-complete (the one similar to intellisense), mmm-mode, unicode/codepage conversion, etc. With vim everything is just at hand.

      --
      hmmm... dumb...
    130. Re:waiting by Anonymous Coward · · Score: 0

      Maybe he was thinking of things like Ctrl-F8 or Ctrl-Shift-LeftArrow, or even Ctrl-5. These don't have a low-ascii equivalent and not all combinations have proper escape sequences in a typical terminal emulation.

    131. Re:waiting by RLiegh · · Score: 1

      Nice try, but after that bath girl link I know better than to click on strange links people post on slashdot! ;)

    132. Re:waiting by Anonymous Coward · · Score: 0
      Yeah, I know, there's that "Preview" thingy, but that would require removing my hands from home base.

      Can't you hit tab with your pinky until you get to the preview button? :P

    133. Re:waiting by vyvepe · · Score: 1

      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

      There is even a better solution. You can set a color scheme which is better for black backgrounds. I like this one for CPP files.

      :colorscheme elflord

    134. Re:waiting by Vo0k · · Score: 1

      I saw a seasoned hacker creating a large system file in vi. He was typing at a leisurely pace, two fingers, tap, tap, tap, tap, no hurry. Two keystrokes per second or so.
      But when I looked at his screen, it wasn't the usual editor's text growth by char, char, char, char, char each keystroke. It was char, char, line, line, char, char, line, two lines, char, word, word, char, line, half-screen, line, line...

      --
      Anagram("United States of America") == "Dine out, taste a Mac, fries"
    135. Re:waiting by BrokenHalo · · Score: 2, Informative
      In the case of Vim it is correct, with the possible exception of Teco.

      I would concur with the latter; indeed, Data General (back in the days of AOS/VS) used to bundle a version of Teco under the name of SPEED. Its only drawback was that the memory usage was quite heavy - but only at the user's end when trying to remember all those commands. ;-)

      But, of course, most people these days tend to forget that Emacs started out as a set of macros for TECO (Tape Editor and COrrector).

    136. Re:waiting by BrokenHalo · · Score: 1
      I might add the caveat that you have be a "real" touch typist to appreciate and be able to fully "unlock" the power of vim.

      Of course, you could say the same with just as much accuracy for Emacs or TECO. It's really the rodent-driven editors that slow you down.

      ^x^c dammit...

    137. Re:waiting by Budrick · · Score: 0

      What exactly is a half-and-halfer?

      Regardless, I've never learned to touch-type properly (pinky goes unused quite a lot), but I find myself able to use vim really quite quickly anyway. I've been using it full-time for about 8 or 9 months, and it's hard to imagine using anything else now.

    138. Re:waiting by HaydnH · · Score: 1

      Man I so want to do a Esc-13dd on that post! =P

      --
      Time is an illusion. Lunchtime doubly so. - Douglas Adams
    139. Re:waiting by Anonymous Coward · · Score: 0

      > 1. Regular expressions even more powerfull than those in pearl

      It's easy to see you know what you're talking about. How about piethon, roobie, or peeutchpee?

    140. Re:waiting by armb · · Score: 1

      > I like :q!. AFAIK, no other editor has an explicit option to "get me the hell out of here, I'm done, don't bother me about it. Thank you."

      While kill-emacs isn't bound to a shortcut by default and save-buffers-kill-emacs is, you can easily change that in your .emacs file if you want.
      (But if you like a moded editor (don't like control or meta keys), then vim is more efficient that emacs in one of it's assorted vi emulation modes. Just because emacs can do everything doesn't make it the right answer for everybody.)

      --
      rant
    141. Re:waiting by lucmove · · Score: 1

      Yes, that is what software is supposed to do: make up for defective hardware.

      Please call me back when this overrated editor acquires the ability to make up for a defective processor, motherboard and monitor. Now I have to run and learn Vim and prepare for the ever likely event of a nuclear holocaust, in which case all Control keys would certainly be swept off the face of the Earth.

      No, I am not an emacs fan. Both of them suck.

    142. Re:waiting by Alioth · · Score: 1

      I find a GUI (which, incidentally is available with Vim - it's not command line only) gets in the way. I want a text editor which never requires me to take my right hand off the keyboard to mess around with the mouse.

      The nice thing about vim is that it does have a gui and a terminal version which work in exactly the same way - I merely use the gui version to make it easier to get multiple windows up at once.

    143. Re:waiting by Stepping+Razor · · Score: 1

      4. fuel ecomony.

    144. Re:waiting by swarsron · · Score: 1

      I like it because its more like a swiss army knife for text than just an editor. Let me give you an example.
      I downloaded some mp3's with filenames like "track01.mp3" or even worse (and they don't have id tags) but i know the album and the interpret. So i go to www.freedb.org and lookup the information. Then i go into the directory with the files and execute:
      ls -1 > out && vim out
      I paste the information from freedb into this file. The file will look something like this:

      ----

      track01.mp3
      track02.mp3

        1. 3:22Freeze Time
        2. 3:43Come Original

      ----

      Then i'll record my actions on one line to repeat it for every other line. I'm currently
      on the line "track01.mp3".
      qq}jf:lll"ad$dd{{jimv "^]A" ""^]"aPa.mp3^]kddo^]jq

      so, this looks really horrible but for a vim freak something like this comes without thinking.
      This will result in a file looking like this:

      ----
      mv "track01.mp3" "Freeze Time.mp3"

      ----

      with a simple sh ./out you'll have nice filenames to generate id-tags from.

      Don't know any other editor which can do stuff like this that easy

    145. Re:waiting by kfg · · Score: 1

      Yes, using a mouse slows you down horribly, but most (if not all) of the "rodent driven" editors can be used effectively entirely with the keyboard.

      But because of the way the keyboard is laid out the use of control and alt keys slows you down as well. Far more than is required by changing modes. In fact, my one real beef with vi is the use of the escape key to change modes. Using the key farthest away from home base prevents accidental mode changes, but really breaks the flow of typing having to reach way out there for it.

      KFG

    146. Re:waiting by kfg · · Score: 1

      Can't you hit tab with your pinky until you get to the preview button? :P

      Oh sure, but just count how many times you have to hit tab to get back to the editing box. :)

      KFG

    147. Re:waiting by Ratbert42 · · Score: 1

      I've been everywhere, man. Emacs, Notepad, Visual Studio, Eclipse, Qedit, MultiEdit, ISPF, DREDIX, Wordstar, Turbo Pascal, etc. Vi is still my first choice. I'm sure Emacs would be great if I worked on one machine all day every day, or a small set of them, but in a given week I can easily end up on a dozen systems including some exotic platforms and customer-owned machines, where the closest thing to a common editor is vi.

      At work about every week or two I'll be working with someone working on some remote posix box and they'll have to hunt and peck their way through doing something using vi, like cursoring over to the end of the line. "Hey, just press $". "What? I've been cursoring to the end of lines for years." If I could just take an hour a week for a few weeks I could really improve everyone's editing productivity.

    148. Re:waiting by akozakie · · Score: 1

      I agree completely. There is just one other powerful editor with similar capabilities and all the advantages of vim - emacs. Which is better is a matter of preference and just like I never could master the piano, I can't make myself feel comfortable with the weird "chords" used in emacs, vim seems much more intuitive once you get used to it. The result? Today I couldn't quit emacs if asked to, I don't even remember the combination for that. But again, this is just a preference.

      But there is another reason for vim instead of emacs. Emacs is huge. When I install a new Linux, whatever distro, vim is just a small addon (even though it is rather large for a vi clone). Emacs? Even with large disks it's noticeable. It is large enough to make a difference in installation time. So - no emacs on my computers. It's just not worth it for me.

      If you don't like it, fine, don't use it. But don't say it's a throwback - once you learn it well enough it just doesn't give competition a fighting chance. Pure power in a small package.

    149. Re:waiting by Anonymous Coward · · Score: 0

      I just did, it's 15 times on my browser. Hey, you're the one that doesn't want to use the mouse. :P Either hit preview some way, or enjoy your entire posts in italics. :)

    150. Re:waiting by kv9 · · Score: 1
      And this, folks, is the sound of a joke going right over someone's head... *WHOOSH*

      and look at his uid... for shame!

    151. Re:waiting by JourneymanMereel · · Score: 1
      A hint could be :set background=dark

      You're my new hero.
      --
      Life has many choices. Eternity has two. What's yours?
    152. Re:waiting by Anonymous Coward · · Score: 0

      Nearly all applications do have modal behavior, in the stricted sense of the word. They just aren't modal centric. The selection/marking in vi is not modal, unlike emacs, vim, notepad, visual studio, etc.

      "Modal centric", then. Whatever. It forces me to think about what "mode" I'm in, and how to get out of it, and that's bad.

      I don't like using the mouse, switching back and forth gives my wrist pains.

      You probably need to fix your setup, then. Moving your hand from your keyboard to your mouse and back should take only slight arm motion, not wrist motion. No wonder it hurts.

      it's not unlike modes in a natural language. "the boy picked up a white truck". was the truck white, the boy or both

      It's completely unlike that. In vi, the same letters do completely different things depending on the mode. It's like having to say "N Boy V truck A white N truck" -- prefixing everything you say with extra information to say how it's to be parsed. Natural language has some redundancy, but not to the absurd level of using the same small set of words for completely different concepts, and requiring you to prefix them with how they're to be parsed. (Where words do have multiple meanings, context makes it clear what you mean; vi has no such intuition, so if you type "hello world" in the wrong mode, strange things happen.)

      understanding that 'dj' means delete down. it's a matter of aquiring the vocabulary for your keyboard. luckily the meaning of the keys are pretty consistant in vi mode.

      And now you've lost me. "j" means "down"? "Consistent" does not imply "good". Yes, if I think about it, I know what the vi movement keys are, but even after years of using vi, I have to stop and think about it. (In Emacs, I can go to the ^Previous or ^Next line -- those at least make some sense to me.)

      (Before you respond, remember that not all of us type on 1868 Sholes keyboard layouts. Those things kill my wrists, with all the contortions they make me do. "e" belongs on the home row, not "j"!)

    153. Re:waiting by the_greywolf · · Score: 1
      ...you can change bash to work like vim...

      ...wha? how come no one told me this? 'splain!!1!

      --
      grey wolf
      LET FORTRAN DIE!
    154. Re:waiting by sp0rk173 · · Score: 1

      It's not making up for defective hardware, buck-o. It has more generic key sequences, thus making it more usable on a larger number of systems...which is a goal certainly in the realm of software utility.

    155. Re:waiting by Nothinman · · Score: 1
      Is there another way to do what ctrl-f and ctrl-g do in vim?

      According to ":help ^G" the command ":f" will also print the filename. There doesn't seem to be any alternative to ^F though, although PgDn works here, but if your CTRL key is mismapped you probably have an equal chance of having PgDn mismapped as well.

    156. Re:waiting by Splab · · Score: 1

      Indeed, but thats not what I wanted - I can do :sh for that.

      What I want is a buffer like the one emacs have.

    157. Re:waiting by colmore · · Score: 1
      --
      In Capitalist America, bank robs you!
    158. Re:waiting by OrangeTide · · Score: 1

      You probably need to fix your setup, then. Moving your hand from your keyboard to your mouse and back should take only slight arm motion, not wrist motion. No wonder it hurts

      wrong.

      It's completely unlike that. In vi, the same letters do completely different things depending on the mode.

      What "modes" are these? There are prefixes and suffixes but those are not distinct modes. there are only two modes in vi, and three modes in vim.

      And now you've lost me. "j" means "down"?

      Like I said, vocabulary. the word "BOY" means something to you, but individually it's just letters B, O, Y. You have a vocabulary that you've memorized to learn what BOY means. j does make some sense because of it's position on qwerty, but I'm not defending j as a good choice. Nor will I defend that capital letters have a totally different meaning compared to lower case letters (except in a couple cases where the meanings are related). If you use dvorak I would highly recommending remapping hjkl to dhtn, which is trival to do.

      Infact vi's key mappings are entirely configurable and quite portable betweeen implementations, meaning you can have one .exrc file and have it work pretty much anywhere.

      Don't get me wrong, I think emacs is a fantastic editor too. I would recommend to anyone serious about manipulating text to choose an editor that at the very least can do what emacs and vi can do.

      emacs is modal too, and it has three normal modes. with two of the modes acting consistantly and one of the modes used only in special circumstances. from a user interface point of view this is better, but please don't pretend emacs is modeless.

      The emacs vs. vi war is unwinnable. Because it falls into personal preference. All I can do is say that vi is not junk, please don't take that to imply that emacs is therefor junk. emacs is easily my second choice in cases vi isn't installed. I think notepad is junk, and I challenge anyone to prove otherwise.

      --
      “Common sense is not so common.” — Voltaire
    159. Re:waiting by Anonymous Coward · · Score: 0

      So how do I learn to Google? Please don't say, 'use it'. I'm wondering if there is a resource for commands ?

    160. Re:waiting by PinkPanther · · Score: 1
      /usr/bin/vi -> /usr/bin/vim-enhanced ...which is common on many modern Linux distros.
      Yes, but an unconfigured, unenhanced VIM (which is what the RH Linuxen ship with) is VIM-M (which is simply VI). Why in the world they don't ship a simple vimrc file or a simple config util to make VIM-M into VIM is beyond me.

      Don't get me wrong...I'm a GNU/Emacs guy. But I work with VIM users and see that it is catching up, and what ships with "many modern Linux distros" is still not VIM, even if it "is" VIM.

      --
      It's a simple matter of complex programming.
    161. Re:waiting by phraktyl · · Score: 1

      I do on my Linux boxen---nvi is one of the first programs I emerge when I install Gentoo. But that doesn't help me at all when I'm stuck on a Windows machine...

      --
      Karma: Marginal (mostly due to the border around the website)
    162. Re:waiting by Mr.+Jaggers · · Score: 1

      *sigh*

      I'm glad the mods actually checked the links before trolling me down... those links were clean!!

      --

      When I grow up, I want to have Christopher Walken hair.
    163. Re:waiting by mav[LAG] · · Score: 1

      The problem is this: vi is not vim. I used emacs for years, then converted to vim for various reasons. After falling in love with Lisp, I looked at emacs again because it's got such good tools for lisp development - like SLIME.

      But Viper, good as it is, doesn't come close to the functionality of vim. Even basic things like visual mode are missing. This isn't Viper's fault of course - it's a vi emulator, not a vim emulator and vim itself is a moving target that has introduced a number of improvements on vi - but suffice to say if you're wedded to editing code in vim, emacs+Viper feels like a giant leap backwards. I know because I've tried.

      --
      --- Hot Shot City is particularly good.
  2. Long ago by BenHoltz · · Score: 0, Troll

    I remember the first days of learning VIM.... Glad to see it progressing.

    1. Re:Long ago by Threni · · Score: 1

      I'm just learning it now. Kvim, that is - part of the suite of stuff you get with Suse. Perhaps you can tell me how to get it to stop randomly resizing the window when I'm trying to read text with it? I'm a newbie to Linux, but it shouldn't be doing that, should it?

    2. Re:Long ago by BenHoltz · · Score: 1

      rm -rf * while logged in as root. j/k

    3. Re:Long ago by Anonymous Coward · · Score: 0

      KVim has been out of development for quite some years now. All new work has been moved to yzis.org

    4. Re:Long ago by trickofperspective · · Score: 1

      Try gvim instead... should also be installed my default, I think. Problem with kvim is a known bug, and the kvim developers have basically abandoned the project.

    5. Re:Long ago by Arandir · · Score: 1

      VIM was never meant to be an embedded GUI component, hence the problems KVim had. They could have made it a standalone app, like GVim, but they really wanted a component based app, so you could use it in Konqueror, KDevelop, etc. Some people talk about synching the GTK+ and Qt event loops, but what do you do when the underlying engine doesn't even have an event loop? They got it to work, but the headache was such that they abandoned the project. KDE 4 is going to have a new VI component, Yzis.

      --
      A Government Is a Body of People, Usually Notably Ungoverned
    6. Re:Long ago by dotgain · · Score: 1
      Oh my aching sides. That just _never_ stops being funny.

      To see an opening like that just begging for that comeback, how intelligent you must be.

  3. syntax highlighting! by Gothmolly · · Score: 5, Funny

    I, for one, welcome our upgraded syntax highlighting overlords. I can't remember the last time I wrote syntactically incorrect code since I switched from vi. Of course, I can still write BAD code, or silly code, but vim catches my typos every time.

    --
    I want to delete my account but Slashdot doesn't allow it.
    1. Re:syntax highlighting! by bill_kress · · Score: 1

      Syntax code is useful while writing code? Hmph, and I'd only needed it for reading and debugging.. Guess I'm unimaginative.

    2. Re:syntax highlighting! by ObsessiveMathsFreak · · Score: 1

      Quite honestly, I really can't code at all without syntax highlighting. I need at least functions and routines highlighted if the code is to make any sense to me. Emacs is still king in this regard, which is a shame, because more apps could do with highlighting these days.

      --
      May the Maths Be with you!
    3. Re:syntax highlighting! by Splab · · Score: 1

      Well said.

      What I really love about vim is that no matter what obscure language I might end up writing in during my computer science studies, there always seem to be a syntax highligt setting for vim. Last new language I did was Occam, and vim even knew about the obscure indenting of Occam. I'm sooooo looking forward to play with the new vim.

    4. Re:syntax highlighting! by stefanlasiewski · · Score: 1

      It's great for typos.

      "Oh look, I forgot to use a close quote. Or I used a single quote instead of a doublequote.

      --
      "Can of worms? The can is open... the worms are everywhere."
    5. Re:syntax highlighting! by dotgain · · Score: 5, Funny
      What I really love about vim is that no matter what obscure language I might end up writing in during my computer science studies, there always seem to be a syntax highligt setting for vim.

      Dude, you could edit /dev/kmem and vim would somehow figure out syntax highlighting for it.

    6. Re:syntax highlighting! by Target+Practice · · Score: 1

      "Oh look, I forgot to use a close quote. Or I used a single quote instead of a doublequote.

      Heyba... uh... well, crap. Did you do that on purpose? I can't make fun of it until I know! Very smooth...

      --
      There's a 68.71% chance you're right.
    7. Re:syntax highlighting! by stefanlasiewski · · Score: 1

      On 'purpose!"

      --
      "Can of worms? The can is open... the worms are everywhere."
  4. What's that odor ? by alexhs · · Score: 2, Funny

    This thread smells the troll, don't you think ? :)

    --
    I have discovered a truly marvelous proof of killer sig, which this margin is too narrow to contain.
    1. Re:What's that odor ? by gEvil+(beta) · · Score: 1

      No, that's just the smell of voodoo carrying over from the Wii article...

      --
      This guy's the limit!
    2. Re:What's that odor ? by Kenshin · · Score: 1

      Smells like a troll?

      I dunno, maybe that's appropriate, since Vim is what I use to clean my toilet...

      --

      Does it make you happy you're so strange?

    3. Re:What's that odor ? by PeelBoy · · Score: 1

      I don't smell anything, and I feel like an idiot because somebody just walked by and saw my sniffing my screen.

  5. Vim 7 by Anonymous Coward · · Score: 3, Funny

    :%s/vim 6.4/vim 7/
    :wq

    1. Re:Vim 7 by Anonymous Coward · · Score: 0

      :%s/vim 6.4/vim 7/ :x

      take that you keystroke waster! :P

    2. Re:Vim 7 by Anonymous Coward · · Score: 0

      Unintended use of wildcard in regexp ;)

  6. This alone is worth it... by digitalhermit · · Score: 4, Funny

    Intelligent completion for C, HTML, Ruby, Python, PHP, etc.

    Yup, this one alone is worth it. Need to write some code? Forget your IDE and just use the C "autoprogram" feature of the new Vi. This message was composed with :set autorespond .

    1. Re:This alone is worth it... by Anonymous Coward · · Score: 0

      Can't figure out how it does Ruby - since Ruby is duck typed, creating a proper list of available methods requires the script to be actually evaluated.

  7. Vim 7 is BLOATWARE! by Anonymous Coward · · Score: 0

    No Thanks

    1. Re:Vim 7 is BLOATWARE! by sp0rk173 · · Score: 1

      I agree. When I saw this I thought, "Hey! Another reason to use nvi!"

  8. How does it ... by Anonymous Coward · · Score: 0

    How does it relate to edlin?

  9. Let's try it out by suso · · Score: 4, Funny

    quit
    q
    stop
    exit
    [esc]
    quit damnit
    ahhhhh

    (just kidding, I know how to quit from vim)

    1. Re:Let's try it out by jellomizer · · Score: 1

      For those who dont.

      [Esc]:q

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    2. Re:Let's try it out by gEvil+(beta) · · Score: 5, Funny

      ctrl-q
      alt-q
      alt-F4
      ctrl-c
      ctrl-d
      esc-esc-esc-esc
      awww, screwit...
      *power button*

      --
      This guy's the limit!
    3. Re:Let's try it out by tomhudson · · Score: 1

      Dammit Jim, next time tell them its CTL+ALT+BACKSPACE !

      ... well, it will quit vim, at least in X ...

    4. Re:Let's try it out by suso · · Score: 1

      Actually, I've gotten used to using [esc]ZZ

    5. Re:Let's try it out by really? · · Score: 1

      Yes, but, that saves your changes, whereas ":q" or, more precisely, "q!" doesn't.

      --

      "Consistency is contrary to nature, contrary to life. The only completely consistent people are the dead." A. Huxley
    6. Re:Let's try it out by From+A+Far+Away+Land · · Score: 1

      EMACS
      Excellent
      Mature
      Artificial
      Composing
      Software.

      VIM
      Very
      Incapable
      Malware

      I kid because I love the vi!
      ZZ

    7. Re:Let's try it out by Anonymous Coward · · Score: 0
      Yukety yuk yuk.

      30 years of free software and it's STILL only elephantine GUI programs that have CUA user interfaces usable by mere humans.

      Seriously. Where is the DOS EDIT clone?

    8. Re:Let's try it out by ZombieRoboNinja · · Score: 2, Interesting

      You jest, but VI made me hate all coding for about a day.

      I was trying to contribute to a project using Mercurial, when lo and behold! It dumped me into VIM.

      Apparently, all I *really* was supposed to do here was enter a line of text describing my patch, save, and quit. But damned if I couldn't find a single menu to do that. The mouse was useless, and the menus were unnavigable.

      By the time I figured out :wq, I'd messed up my entire Mercurial depository and had to reinstall and manually patch the whole damn project because I'd botched it. Frigging :wq...

    9. Re:Let's try it out by TheRecklessWanderer · · Score: 1

      You forgot format C: /s /e /v /q Or, hand me that power saw...

      --
      Mean what you say...say what you mean.
    10. Re:Let's try it out by Maimun · · Score: 1

      :) I remember the first time I tried vi, back in 1995. I was being introduced to UNIX (to AIX, in fact) by a friend. Once he told me that THE EDITOR is vi, although, he said, there is something called pico. Soon I did "vi sometextfile" and tried to do some editing to see how vi works, without asking him for help or reading man pages. Then I tried to quit. For a while I was struggling with vi. All of sudden, my friend who was sitting far away from me facing the opposite direction, said "I hear you are using vi".

    11. Re:Let's try it out by truedfx · · Score: 1

      ctrl-c

      Oh look. Suddenly the bottom line reads "Type :quit to exit Vim".

    12. Re:Let's try it out by Lord+Ender · · Score: 1

      To understand vi, you must first understand ed.

      Ed is the standard text editor.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    13. Re:Let's try it out by Waffle+Iron · · Score: 1
      Then you might be interested in: ZQ

      (I find it easier to type)

    14. Re:Let's try it out by FST777 · · Score: 1

      alt-F4 could (should) have switched you to another virtual terminal, where you could just type killall vim.

      My first try at vi looked like this:
      q
      esc
      damnit...
      alt-F1
      login...
      man vi

      --
      Free beer is never free as in speech. Free speech is always free as in beer.
    15. Re:Let's try it out by Anonymous Coward · · Score: 0

      Time to dig up that great fortune which always cracks me up:

      vi is [[13~^[[15~^[[15~^[[19~^[[18~^ a
      muk[^[[29~^[[34~^[[26~^[[32~^ch better editor than this emacs. I know
      I^[[14~'ll get flamed for this but the truth has to be
      said. ^[[D^[[D^[[D^[[D ^[[D^[^[[D^[[D^[[B^
      exit ^X^C quit :x :wq dang it :w:w:w :x ^C^C^Z^D
              -- Jesper Lauridsen from alt.religion.emacs

    16. Re:Let's try it out by say · · Score: 1

      Try changing your EDITOR environment variable to something else than vim, then. Like pico. EDITOR controls your preferred editor, which apparently is not vim.

      --
      Roses are #FF0000, violets are #0000FF, all my base are belong to you
    17. Re:Let's try it out by Schraegstrichpunkt · · Score: 1

      Just be sure not to double-tap that Z.

    18. Re:Let's try it out by HermanAB · · Score: 1

      The absolutely worst editor is edlin, which is still shipped with MS Windows XP:
      http://www.microsoft.com/resources/documentation/w indows/xp/all/proddocs/en-us/edlin.mspx?mfr=true
      http://tinyurl.com/hm9uc

      Compared to that, using vi is a breath of fresh air...

      --
      Oh well, what the hell...
    19. Re:Let's try it out by Schraegstrichpunkt · · Score: 1

      Or your VISUAL variable. If I remember correctly, EDITOR was/is for things like ed or ex.

    20. Re:Let's try it out by Gorshkov · · Score: 1

      I used edlin and xedit on control data mainframes, way back in the dark ages. Somewhere around '80-'82 or somesuch.

    21. Re:Let's try it out by fingusernames · · Score: 1

      A while ago, a script-kiddie broke into an old Linux box. He left behind his history files and such. He made many typos at the shell, and used pico. We didn't lock him out immediately -- instead, I removed pico and made it a link to vi. The kid would get back in, start 'pico' and then disconnect his shell connection. He had no clue how to exit the program. It was hilarious.

      Larry

    22. Re:Let's try it out by fingusernames · · Score: 1

      As I recall it:

      Eight Megabytes And Constantly Swapping

      Back in the day, EMACS was a *huge* program to be using casually, in particular on the Unices that didn't implement re-entrant executables.

      Larry

    23. Re:Let's try it out by Anonymous Coward · · Score: 0

      "alt-F4 could (should) have switched you to another virtual terminal, where you could just type killall vim."

      Well, the canonical way is pkill vim since that works on more platforms. :-)

    24. Re:Let's try it out by HaydnH · · Score: 1

      Errr why not Esc-wq! (write & quit)

      --
      Time is an illusion. Lunchtime doubly so. - Douglas Adams
    25. Re:Let's try it out by Wonda · · Score: 1

      why does everyone type wq? just x will do!

    26. Re:Let's try it out by HaydnH · · Score: 1

      Perhaps :x wasn't implemented in the old vi versions? I'll have to check on my Solaris box when I get home.

      --
      Time is an illusion. Lunchtime doubly so. - Douglas Adams
    27. Re:Let's try it out by soliptic · · Score: 1
      (just kidding, I know how to quit from vim)

      Well you say that, but I didn't when I tried using Linux. Since I couldnt figure out how to save & exit when editing a conf file, I couldnt get internet on the go, or X windows, or indeed do anything whatsoever except "ls".

      Never tried Linux since...

    28. Re:Let's try it out by Waffle+Iron · · Score: 1

      Because w moves the cursor to the next word, and q starts recording a macro. You probably mean '[esc][shift]:[unshift]wq[shift]!' instead, which requires typing four characters and accurately toggling the shift key twice. '[esc][shift]ZQ' is less than half of that effort.

  10. Spell Check by Danathar · · Score: 3, Funny

    Now I can die.

    1. Re:Spell Check by Zontar_Thing_From_Ve · · Score: 2, Funny

      Now I can die.

      Or if you use Emacs you can wish you were dead.

      (ducks)

    2. Re:Spell Check by ElectricRook · · Score: 1

      I thought apps only continued to evolve until they could read mail, then they stopped evolving. Apparently VIM is breaking the mold.

      --
      - High Tech workers, please say NO to Union Carpenters, their Union sees fit to control our compensation.
    3. Re:Spell Check by Anonymous Coward · · Score: 0

      map :w!:!aspell check %:e! %

      To think, you could have had this all along!

    4. Re:Spell Check by ceeam · · Score: 1

      So dye beech! :)

  11. 360kb floppy? by Anonymous Coward · · Score: 0

    Great, but will it fit in a 360kb floppy?

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

    1. Re:vim 8 will do email by Anonymous Coward · · Score: 0

      > vim /var/mail/${USER}

    2. Re:vim 8 will do email by GreatBunzinni · · Score: 1

      I don't believe that any reasonable person considers the spellchecker of any text editor to be bloat.

      --
      Slashdot, fix your code or at least hire someone who is competent at it to do it for you.
    3. Re:vim 8 will do email by pnot · · Score: 1

      I don't believe that any reasonable person considers the spellchecker of any text editor to be bloat.

      Bloat is in the eye of the beholder. With every new, bigger release of an application, someone is likely to quote the factoid that "most people only use 20% of the features", so why can't we strip it down to one-fifth the size? The adage disregards the fact that not everyone uses the same 20%. To me, a spellchecker is bloat, because I never need to use one; to someone else, Xemacs' rectangular selection feature might be bloat, whereas I find myself using it quite frequently.

    4. Re:vim 8 will do email by Anonymous Coward · · Score: 0

      Pre-7 Vim can already do email.

    5. Re:vim 8 will do email by fingusernames · · Score: 1

      That depends. Embedding a spell-checker into the editor is not the Unix way. I've used spell/aspell/ispell for years, and haven't ever lamented the lack of a spell-checker in vi. Hell, given that I didn't learn to write with the crutch of an integrated real-time spell-checker as commonly and annoyingly found today, I rarely need one as I rarely make a spelling mistake that I don't immediately recognize. I'm sure people who typed on actual typewriters without correction ribbons were even better spellers.

      Anyway, I think a reasonable person would expect an editor to use an external spell-checker, whether provided as an OS/library API service, or an external application. I don't know how the latest vim (honestly, I still use vi and clones pretty much as I did in 1987 unfortunately) does it, but I hope it does it that way rather than developing a new wheel.

      Larry

    6. Re:vim 8 will do email by dodobh · · Score: 1

      I already write mail(1) from within vim(1), except that it is invoked from mutt(1).

      --
      I can throw myself at the ground, and miss.
  13. I just can't get the hang of vim by ylikone · · Score: 4, Interesting
    I've tried on and off since 1995 to get into using vi/vim and I just can't. I am unable to make it work as smoothly as "joe". That's right, for my choice of console-based editor, I use niether vi or emacs! "joe" has been doing everything I need a text editor to do easily since 1995. I cringe when I have to use vi/vim.

    I know I will get flamed for this. Oh well, it's the truth. I'm sure there are a few others that would agree with me.

    --
    Meh.
    1. Re:I just can't get the hang of vim by eln · · Score: 2, Informative

      Everyone has their editor of choice, but really vi is not that difficult. These days, you can even use the arrow keys to navigate to make it even easier (although I still prefer the letters). If you can't learn how to use vi well enough to perform basic text editing functions within about 20 minutes, maybe system administration is not for you.

      Vi is simple, elegant, and light-weight. It takes only a few minutes to learn, but years to truly master. Vim is a misguided attempt to add the bloat of emacs to vi.

      Other editors like joe may have their uses, but vi has two major advantages:

      1.) It has a deceptively simple command set that hides a tremendous amount of power. This is the Unix way.

      2.) It's included in virtually all Unix and Unix-like systems, which makes it a vital skill for any sysadmin.

      Vim is unnecessary and its "most useful" feature, syntax highlighting, is the first thing I disable whenever I use it, and I use it for development work (on systems where vi has been replaced by vim).

    2. Re:I just can't get the hang of vim by Zetta+Matrix · · Score: 1

      "Tried on and off"? I had problems with this too.

      You must immerse yourself in vi, and (gasp) practice its features in increasing levels of difficulty until it becomes second nature. I used to use vanilla editors too, and the difference in text editing efficiency is astounding.

    3. Re:I just can't get the hang of vim by Anonymous Coward · · Score: 0

      I class any editor where you can't type right after starting it as 'difficult'.

    4. Re:I just can't get the hang of vim by Gulthek · · Score: 2, Interesting

      I do some development from Windows and Linux.

      You just can't do stuff like:

      Delete ^M DOS returns - :%s/\r//g
      Turn ^M into "real" returns - :%s/\r/\r/g

      with Joe.

      More VIM tricks.

      Then there's block editing (quickly comment out sections of code), recording, complete access to all commands (including navigation) from the homerow of the keyboard, etc.

    5. Re:I just can't get the hang of vim by Anonymous Coward · · Score: 0

      vi will probably always have a really high learning curve. Unless you have time to experiment with it or are forced to use it, it's hard to get used to vi (or gVim - which I use more).

      I don't blame anyone for not being able to use it. I remember how pissed off people (including me) used to get my freshman year of college dealing with vim for the first (or second or third or tenth) time. There are number of hurdles. Knowing the difference between command mode and insertion mode for one. Learning even the basic commands to make you functional also takes a while, let alone mastering most of the commands, not to mention the different ways you can combine them.

      What finally got me using vi on a regular basis was how impressed I was watching experienced vi users edit text. The speed of a vi pro is amazing. When they can insert/edit/copy-paste in the blink of an eye without touching that damn mouse, I couldn't help but ask (and keep asking) "how'd you do that?" Sure enough, as a decent gVim user, I'm pretty fast now too. For me, the learning curve was worth it. Especially considering how often I find myself on a unix box where I have to use vi.

      I wonder if there is a simple video game where the controls are all vi commands to help people learn it?

    6. Re:I just can't get the hang of vim by mrtrumbe · · Score: 0, Troll
      Yeah, well I have a punch card reader that I use exclusively for input on my system. Who's got the bigger "I'm a hardcore, old-school user" dick?

      Seriously, though, I can't think of a reason a person would find syntax highlighting not useful. Then, to take it further, why a person would find it so UNhelpful that they found the need to turn it off. What is it, exactly? Does it somehow distract you? Are you color blind? Do you think it slows down your editing experience? Does it mess up highlighting (something I've never experienced)?

      Given that a document you are editing has content that has a well structured syntax, highlighting will help you make visual distinctions between unlike syntactical structures. This makes individual structures easier to pick out, increasing your ability to act on those structures. It's really just a question of speed.

      Then, maybe I'm just too slow. Maybe for certain geniuses in our midst their brains instantly recognize constructs as distinct without any visual aide at all. If so, all the more power to ya. I'll continue to use my highlighting.

      Taft

    7. Re:I just can't get the hang of vim by robthebob · · Score: 1

      Also interested to know *why* you would ever disable syntax highlighting?

    8. Re:I just can't get the hang of vim by 31415926535897 · · Score: 1

      I didn't start learning vi(m) until about 2001 when I started a programming job in college. It was the editor of choice there, and I only started because everybody there made fun of me for using something else.

      It was very slow going. I learned first about insert mode, and enough to save and exit my document. Other than that, I used it exactly like I would have used notepad (in insert mode with the arrow keys).

      Over the years, I have picked up little tips here and there from friends, co-workers and the Internet (heck, even some from Slashdot). Now that I've had about 5 years practice with it, I feel like I can really fly around my document. I know I can't control it perfectly yet, I'm always catching myself doing something "inefficiently" in vim, and there are still a ton of things I don't know, but I really like it much better than any other editor I've tried.

      I believe the key is to force yourself to use it. If I had only been using it on and off for the last 5 years, I'd probably still be using the arrow keys to move around the document. I'm sure this would be true for either emacs or vim, but if you use it every day, and go through the pain of figuring things out little by little, after just a little bit of time you'll be fast enough, and after a while (probably years), you'll really start to master it.

      Also, if you use Windows at all, I highly recommend downloading/installing gVim. Not only can you use the standard vim keybindings, you can also use traditional Windows key combos. So if you're in insert mode and you want to save your document, you can hit Ctrl-S if you want (and stay in insert mode), instead of Esc, :w, Enter, i. Also, if you install it right, you can edit anything in vim with from the right-click context menu.

      Another tip I would give is to switch your Caps Lock key to Esc (who really uses Caps Lock anyway, besides shouting trolls). It makes editing in Vim so much faster (or at least it feels that way). The biggest disadvantage to this is trying to edit on a machine that isn't set up like this (I habitually hit Caps Lock instead of Esc). To do this in Windows (XP at least), you have to add a registry value. So fire up your favorite registry editor, go to "HKLM\SYSTEM\CurrentControlSet\Control\Keyboard Layout" and add a Binary Value named 'Scancode Map' with the hex value '00 00 00 00 00 00 00 00 02 00 00 00 01 00 3a 00 00 00 00 00'. As usual with Windows, you'll have to reboot for the changes to take effect (but you're never more than a Tuesday away from a reboot).
      In X I execute 'xmodmap ~/.swapcaps', and .swapcaps contains the following:
      remove Lock = Caps_Lock
      remove Lock = Escape
      keysym Escape = Caps_Lock
      keysym Caps_Lock = Escape
      add Lock = Caps_Lock

      My last vim tip of the day is going to be the equal sign (=). You can use it to auto-indent your document (assuming you're programming). If you want to autoindent everything, when in normal mode, type 'gg=G' (without the quotes). If you want to indent one particular line, hit equals twice (==), and like everything else if you type a number before the double equal sign, it will indent that many lines.

    9. Re:I just can't get the hang of vim by thePig · · Score: 2, Interesting

      I guess different people use VIM for different reasons -
      I *never* ever use syntax highlighting, but after using VIM for last 3 years (after using VI for around 2 years) I find that I cannot use VI at all nowadays.
      For ex - I got so used to multiple undo that VI is a real pain the neck now.
      Other VIM features I use a lot are multi window , remote editing (I work on a m/c which is almost half way across the globe, and remote editing is ONE important feature) & MACROs.

      Not to mention all the small (for ex: expandtab/visual mode etc) features.

      One anecdote -
      I had an activity, where I had to convert around 80K lines from PASCAL to a different (proprietary) language. A very boring and _no_use_ work indeed. We were given 2 months to do that. With the help of quite a bit of macros, I converted the whole thing in less than 3 weeks.

      So I dont think that VIM is a misguided attempt at all.

      --
      rajmohan_h@yahoo.com
    10. Re:I just can't get the hang of vim by Pope · · Score: 1
      I've tried on and off since 1995 to get into using vi/vim and I just can't.

      Aha! I always wondered what TRON and TROFF stood for!

      --
      It doesn't mean much now, it's built for the future.
    11. Re:I just can't get the hang of vim by cicho · · Score: 3, Funny

      "These days, you can even use the arrow keys to navigate to make it even easier"

      Said with a straight face too, I'm sure. Only on slashdot!

      --
      "Only the small secrets need to be protected. The big ones are kept secret by public incredulity." - Marshall McLuhan
    12. Re:I just can't get the hang of vim by Anonymous Coward · · Score: 0

      Actually, "joe" is more Unix than vim. I can send a buffer to sed and awk and have it replaced in-line. Vim builds in sed and a million other things, which is more like "the Windows(tm) way". Unix is "do one thing and do it well". Joe does one thing well, selecting, moving, inserting and deleting text visually, something no other Unix tool can do. For everything else, you use the Right Tool for The Job.

      All you vim people never leave your shell window. I use sed, awk, cut, paste on a daily basis. For editing, and now I do many more jobs with shell scripts because I actually understand how to use sed and awk effectively. Just plain faster than Perl in most cases.

      Notice I keep saying Vim. I hate vim. Vi is tolerable.

    13. Re:I just can't get the hang of vim by jdoff · · Score: 1
      Delete ^M DOS returns - :%s/\r//g
      ^K F ` [Enter] R [Enter] R
      Turn ^M into "real" returns - :%s/\r/\r/g
      ^K F ` [Enter] R \n R
    14. Re:I just can't get the hang of vim by Anonymous Coward · · Score: 0

      i'm moving from php to rails and thought i'd do well to make the transition to a linux dev along with the change. no more php designer 2005 for me. settng up eclipse/phpeclipse with debugging is tricky at best. maybe things have improved lately.

      anyway, i thought i'd give vim a try. well, cream for vim anyway. i read you had to start vim and type cream to get it started. sounds easy.

      i couldn't type cream. in fact, i had no clue what to do.

      anyway, i searched for an ide and found that folks liked quanta. i tried it out and it is good so far.

      i wouldn't mind learning cream/vim, but there has to be tutorial for newbs to at least get started how to learn the thing. not only that, it needs to be easy to get to.

      as it stands now, vim is for the elite geeks... and they can have it. if i need to bang my head on an editor to gloat as king geek, i'll leave it alone. all my head banging is reserved for code.

    15. Re:I just can't get the hang of vim by Anonymous Coward · · Score: 0

      I do have an odd notion that if you open a text editor and start banging keys, letters should start appearing.

    16. Re:I just can't get the hang of vim by eln · · Score: 1

      Because it's distracting, and because certain colors it uses end up almost invisible on xterms.

      I prefer my text to be black, not an array of blinding colors.

    17. Re:I just can't get the hang of vim by Atzanteol · · Score: 1

      Vim is a misguided attempt to add the bloat of emacs to vi.

      Or for Vi users who want more than one level of 'undo.'

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    18. Re:I just can't get the hang of vim by Atzanteol · · Score: 1

      I hear ya. I did the same thing. Just threw myself at it to see what all the hype was about. Now I *cringe* when watching co-workers spend forever highlighting a line with a mouse and then typing "ctrl+c ctrl+v" to copy it. "yyp" is *soo* much nicer...

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    19. Re:I just can't get the hang of vim by Anonymous Coward · · Score: 0

      Joe saved my life about a month ago when one of the hard drives died on our Linux file server. The bad hard drive was preventing the GUI (KDE) and most services from starting up. I do not know much about Linux but I knew I had to erase that bad HD from the "fstab" file. VIM would let me edit the file but not save it (the error was associated with insufficient HD space - but fstab was on the good HD). In desparation I tried Joe, and it let me both edit and save. I was able to reboot and get into KDE. I have no idea why Joe let me save and VIM didn't. This was SUSE 10.

    20. Re:I just can't get the hang of vim by DataPath · · Score: 1

      funny thing is, I only use the arrow keys to navigate when I'm using a coworker's dvorak keyboard. On one of those, hjkl don't make much sense for navigation:w

      Crap. When can I get vim embedded into text fields in Firefox?

      --
      Inconceivable!
    21. Re:I just can't get the hang of vim by 00lmz · · Score: 1
      I can send a buffer to sed and awk and have it replaced in-line.

      Well, if you want to do that, there's always the "!" command. I personally can't stand joe's keystrokes. If I use a visual non-modal editor, I prefer the CUA keyset :).

    22. Re:I just can't get the hang of vim by colmore · · Score: 1

      I think "these days" here refers to "since 1987 or thereabouts." ... when was the first vi (or vi clone) to support full IBM keyboards?

      --
      In Capitalist America, bank robs you!
    23. Re:I just can't get the hang of vim by sp0rk173 · · Score: 1

      vim has the annoying habbit of auto-saving (another reason why i love nvi), so it probably woudln't let you edit it because it didn't have enough space to allocate it's little back-up autosave douchebag file. I have a feeling if you were using nvi instead of vim, you would have been able to edit and save the file.

    24. Re:I just can't get the hang of vim by Anonymous Coward · · Score: 0

      i like joe

    25. Re:I just can't get the hang of vim by General+Lee's+Peking · · Score: 1

      I'm a fan of both emacs and vi, but I do agree with you. When the bloat of emacs gets in the way instead of helping I need vi, not vim which both RedHat and Apple try to force down our throats on their systems. I always install the real thing from sourceforge on any machine I'm going to spend a significant amount of time on. Lightning fast, no surprises in the keystrokes, no highlighting to make it unreadable on certain terminals... Sometimes it just feels like coming home.

    26. Re:I just can't get the hang of vim by Homestar+Breadmaker · · Score: 1

      This is why you shouldn't use linux. Vi and Vim are not the same. Vi should be small, and usable for disaster recovery without any special changes. Your problem was likely because of vim trying to create a backup file, there's some command line switch to prevent that.

    27. Re:I just can't get the hang of vim by Anonymous Coward · · Score: 0

      You can change the colours, what kind of programmer are you? The fact that you like *black* text tells me you spend too much time on a GUI not to be biased.

    28. Re:I just can't get the hang of vim by jesterzog · · Score: 1

      Have you considered using the Windows gVim? (Unfortunately this would be dependent on having access to a Windows system, of course.) Many of the commands are available through drop-down menus, but also have the command keys listed in the menu. If you have access to a Windows machine, it might be a useful way to learn.

    29. Re:I just can't get the hang of vim by Nemosoft+Unv. · · Score: 1

      These days, you can even use the arrow keys to navigate to make it even easier

      This is exactly what put me off from vi years ago when I started using Unix. How many times I didn't have to clean up strings of [B
      [B
      [B
      [B
      [B
      [B
      all because I wanted to correct a typo a few lines above; it just didn't make sense. You can say all you want about its powerful commands, having to put the user in either command or edit mode is not my idea of fun. Or usability.

      Sorry, but I'll stick with joe. Or kate.

      --
      "Fix it? It has been disintegrated, by definition it cannot be fixed!" - Gru in Despicable Me.
    30. Re:I just can't get the hang of vim by Anonymous Coward · · Score: 0

      No doubt about it, "joe" is a simple-to-use editor, and there's no reason not to use it for simple tasks - editing config files, composing mail or other short text, etc. It's no word processor, and of course neither is vi / vim.



      There's no denying that vi / vim has a steep learning curve. I recall first learning to use vi around 1988 - it's modal operation was counterintuitive, but not completely unfamiliar as I was familiar with edlin on DOS systems. Its command mode syntax seemed extraordinarily bizarre and cryptic to me, but as I needed to work in various flavors of UNIX, vi was the only common option, so it was imperative to learn it.



      Learn it I did, and now I wouldn't use anything else (but vim) for most editing tasks. The syntax highlighting features have saved me countless hours while coding, and now the command syntax that I found to be so bizarre and complex is now almost second nature. Yes, I still keep a quick reference sheet taped next to my monitor, but I hardly ever refer to it now.



      vi / vim is simultaneously complex and elegant, anachronistic and powerful. It also happens to work on every OS that I might ever wish to work on, modern and obsolete.



      It's not about having the biggest ePenis, it's about using effective tools that work for YOU. joe works for you, vim works for me.

    31. Re:I just can't get the hang of vim by digitect · · Score: 1

      Cream is easy to start, you just type "cream" at the command line.

      Or if you are using GNOME/Linux or Windows you just click on the Cream icon.

      It doesn't start from within Vim.

      --
      There is no need to use a SlashDot sig for SEO...
    32. Re:I just can't get the hang of vim by Breakfast+Pants · · Score: 1

      And also "no multiple undo", how 70's. Side note, you can add this to your .vimrc : set background=dark if you use a black terminal. Or you can just disable syntax highlighting. Even if you only use vi features, multiple undo is enough to offset all of the bloat.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    33. Re:I just can't get the hang of vim by Breakfast+Pants · · Score: 1

      This rocks.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
  14. You know what they say about Vi users.... by Anonymous Coward · · Score: 0

    Small executables, small minds.

    1. Re:You know what they say about Vi users.... by Anonymous Coward · · Score: 0
      Does that mean Visual Studio would be a buffer overflow? That really would expalain an awful lot.

      :wq

  15. My history with VIM by ThePopeLayton · · Score: 4, Interesting

    I was a TA for a basic CS class for over a year. Upon first exposure the VIM (the editor that our system admins installed) many students got really frustrated. Most of them didn't understand how as they scrolled up on down with the mouse that random pieces of text got inserted all over their programs causing a tons of errors.

    I too was pretty annoyed with VIM at first as that it is set up in such a way that it expects you to be a power user. I haven't downloaded the latest version but will do so shortly. But I would like to see a version of VIM that the everyday joe shmoe could use. Less clunky font, easier to set preferencess, and a way to turn of all those linux short cuts that we non-linux people are plagued with. I think there is a definate need for a more userfriendly version of VIM

    1. Re:My history with VIM by Anonymous Coward · · Score: 0

      How about using an editor which is not meant to be used by experts then???

    2. Re:My history with VIM by Anonymous Coward · · Score: 0


          I think the program you're looking for is called "Wordpad"
      </troll>

      (okay, and now for a useful comment: "gvim -y" will launch vim in easy mode)

    3. Re:My history with VIM by zlogic · · Score: 1

      Your post looks like flamebait, but still - Vim is popular exactly because it works that way. Customizable (most power users have their own hand-crafted configs), light, console-based (great in shells and when your system is screwed up) and does a lot of stuff really fast if you know how to use it. I usually use vim for editing configs or when I'm too lazy to run Kate or Gedit. For editing text files, source code etc. I usually use Kate. If you don't like Vim because of its interface, use another editor, perhaps nano. Vim's interface is the reason that makes it popular.

    4. Re:My history with VIM by Anonymous Coward · · Score: 0

      :so $VIMRUNTIME/mswin.vim

      that should do it.

    5. Re:My history with VIM by pilkul · · Score: 1

      Not really. If you want something beginner-friendly, try one of the hundreds of other editors, 90% of which are easier to learn to use than Vim. Vim has its target userbase and they're happy with it.

    6. Re:My history with VIM by AnonymousKev · · Score: 5, Insightful
      I was forcefully introduced to vi in 1989. It was in a two-week "Introduction to C" class from Cray. The instructor (I am not making this up: his name was Kermit) had made sure that vi was the only editor on the class computer. I'll never forget his words:
      vi is the most efficient editor ever written. You will hate it intensely for the first two weeks, after that you will discover you can't live without it.
      He was absolutely right.
      --
      Anonymous Kev
      Proudly posting as AC since 1997
      (Finally got a dang account in 2004)
    7. Re:My history with VIM by nuzak · · Score: 1

      I've used vi for sixteen years, I use it now about as frequently as emacs.

      I still hate it. I used modal editors with better interfaces on PRIMOS of all things.

      The thing I hate the most about vi? The distinction between append and insert.

      --
      Done with slashdot, done with nerds, getting a life.
    8. Re:My history with VIM by Anonymous Coward · · Score: 2, Informative

      There is a more user-friendly version of Vim for Windows types, at least: 'gVim Easy' is installed in Vim's 'Start' menu entry when you use the Vim all-in-one installer for Windows. It's Vim with a GUI and no command mode. No ESCing; no arcane shortcuts; everything accessible from a graphical menu.

      Has anyone who complains about how "difficult" Vim is actually tried it more recently than 1991?

    9. Re:My history with VIM by Anonymous Coward · · Score: 0

      > The thing I hate the most about vi? The distinction between append and insert.

      What's the difference beyond where you're starting to insert text? What would you suggest instead?

    10. Re:My history with VIM by abmhmd · · Score: 1
    11. Re:My history with VIM by Gumshoe · · Score: 1
      In that case you may enjoy Cream. From the project's blurb.
      Vim is one of the most powerful, lightweight and full-featured text editors ever created. It is the popular and famous descendant of the 1976 Vi text editor. Vim is also free and works on most operating systems. But Vim has a steep learning curve. It was not primarily designed to be easy to use, favoring performance and technical flexibility instead. Because it is so different, learning to use Vim takes time. Cream shapes Vim to use the standard Common User Access model of user interface.
      I don't know if it works perfectly with Vim 7 but you could always try it with 6.4.
    12. Re:My history with VIM by Anonymous Coward · · Score: 0

      If you don't like, DON't USE IT! And stop complaining!

      vim IS for power users. Per definition even! ;)

      So if you want to play with "my first editor (TM)" go install notepad! ;P

      But to be serious: There's one thin i don't understand:

      Why in the world are poeple THAT stupid???
      What you need is: Several different levels of user guidance. Beginners get much support and can lower it slowly, getting more and more efficient, until they stop at a level because they don't use it that much, or they become pros that don't need no stinkin' assistance.

      So why does ANYONE even THINK about creating a program ONLY for easyness OR for pros, when you can have BOTH?

      It's so simple and implicitly clear IT JUMPS RIGHT INTO YOUR FACE! So why???

      Are both developers and feature-requesting users that deadlocked or only that STUPID??

      Okay, forget it. I just read that nowadays the average IQ (100) is equivalent to an IQ of 70 in the 70s...

    13. Re:My history with VIM by EmoryBrighton · · Score: 1

      it already exists, try ln -s /usr/bin/vim /usr/bin/evim ... then just call evim. It will respond like any other joe editor would. But then you don't gain anything from it, the true power of vim relies on your ability to stay off 'Insert' mode.

      --
      Rule 2: Writing a spec is like writing code for a brain to execute.
    14. Re:My history with VIM by ferat · · Score: 1

      Ah, good old Kerm. He still teaches, fyi. MacOSX Server stuff these days.

    15. Re:My history with VIM by Anonymous Coward · · Score: 0

      PRIMOS, that brings back vague memories. I last used it back in '78.
      I agree though, that was an excellent editor. It would have been nice to see it ported 10 years ago.

    16. Re:My history with VIM by AnonymousKev · · Score: 1
      Really? Cool! :)

      He won't remember me from Adam, but tell him one of the guys from the class in the OXY building said "Hello".

      --
      Anonymous Kev
      Proudly posting as AC since 1997
      (Finally got a dang account in 2004)
    17. Re:My history with VIM by PeterBrett · · Score: 1

      There's a distinction between append and insert?

      Dang. *goes back to sweet, sweet emacs nirvana*

    18. Re:My history with VIM by gatkinso · · Score: 1


      Well, compared to ed vi(m) is extemely user friendly.

      Ah, but this is 25 years later, and surely "we" can come up with something better you may retort... and you would be correct. Sort of.

      Thing about vi is that once you do actually master the admittedly arcane keystrokes and escape sequences... you end up with a very powerful *code* editor.

      I would ahte to write a book using vi (but people have BION), but of coding... well let me just say that MS is missing the boat by not bundling a vi keystoke option with Visual C++.

      --
      I am very small, utmostly microscopic.
    19. Re:My history with VIM by Malc · · Score: 1

      Here is your solution.

      Oh wait a minute, I was supposed to save this type of witty response for a Windows story and link to Debian. My bad.

    20. Re:My history with VIM by aCapitalist · · Score: 1

      I can relate to that. A guy at work was hacking some code using a version of vi for OS/2. I was like WTF is up with that? I started playing around with it after hours and at first it was frustrating, but these days I feel handicapped if I don't have a vi plugin for an IDE. And Vim is always there for quick edits and reading text files.

    21. Re:My history with VIM by Mr2cents · · Score: 1

      I learned vim in 3 days, but I was learning like 8 hours a day. It's an investment that has paid off I may say. there are commands like gf that can save a lot of time (e.g. in a script position the cursor on the name of another script/config file and type gf, you immediately *G*o to that *F*ile. Use CTRL-o to go back).

      Start with vimtutor, then start RTFM. (Telling someone to RTFM sounds like an insult, I know, but that's where many power users got their power, including myself).

      --
      "It's too bad that stupidity isn't painful." - Anton LaVey
    22. Re:My history with VIM by Lugae · · Score: 1

      I have a client that has setup SSH for us to do web development with. The other guy that works with this client FTPs his files over to run them against the PHP runtime with the CMS that they are using. I have vim installed on my Windows box and use it for local development work. For me to run my scripts against the PHP runtime and the CMS for this client, I ssh in and work in vim. My work is done entirely native to me, because I already know vim. There are some serious advantages to this. And when the network is slowed down? Not nearly as bad as, say, a VNC connection. I'm not saying that other solutions don't work, but command line text editors are really handy. Vi has always been there for me, which I can't say of visual studio...

    23. Re:My history with VIM by Buck2 · · Score: 1

      Append and insert mean different things. They're not synonyms. Why would you have them _not_ be distinct in nature?

      --

      As my father lik@(munch munch)... ....
    24. Re:My history with VIM by scottl · · Score: 1

      Try vim -y

      which will put you into "easy" mode. From the vim help:

      -y Easy mode. Implied for |evim| and |eview|. Starts with
                      'insertmode' set and behaves like a click-and-type editor.
                      This sources the script $VIMRUNTIME/evim.vim. Mappings are
                      set up to work like most click-and-type editors, see
                      |evim-keys|. The GUI is started when available.
                      {not in Vi}

      A windows install will put an icon on the screen for this mode.

    25. Re:My history with VIM by pthisis · · Score: 1

      There's a distinction between append and insert?

      Dang. *goes back to sweet, sweet emacs nirvana*


      Not really. Unless you're in strict compatibility mode, the only thing those affect is where you start typing. (A)ppend puts you at the end of the line (like hitting Ctrl-e in emacs). (a)ppend puts you after the current character (like hitting Ctrl-n in emacs). (i)nsert puts you before the current character.

      --
      rage, rage against the dying of the light
    26. Re:My history with VIM by colmore · · Score: 1

      It's called Cream.

      http://cream.sourceforge.net/

      It's the gateway drug into a wonderful universe.

      --
      In Capitalist America, bank robs you!
    27. Re:My history with VIM by khallow · · Score: 1

      To reduce the complexity of the system. Basically, it's just a matter of cursor placement. Why is there two almost identical means of inserting characters?

    28. Re:My history with VIM by Buck2 · · Score: 2, Informative

      For exactly the reason you mentioned, cursor placement. Insert inserts and append appends. They're fundamentally different approaches and, as such, they have different behaviors. They also extend to such places wherein you can also use "shift-i" to insert at the beginning of the line or "shift-a" to append to the end of a line.

      Append becomes very useful if you're writing a quick macro to tack or change something onto/in a filename and you don't want to bother with a shell script.

      Suppose, for example, that you have a few files in a directory:

          pic1.gif pic2.gif pic3.gif pic4.gif

      And you want to convert them all to PNG. You can do this a few ways, but, these are what I use most commonly:

      method 1, with bash)
      for i in `ls *.gif`; do convert $i ${i%gif}png; done

      method 2, with vim)
      bash> ls *.gif > dothis; vim dothis
      [now, in vim]
      q1 [macro in register 1]
      yy [yank this line]
      p [paste it below]
      k [move back up a line]
      J [join the two lines together]
      A ["append"]
      bksp-bksp-bksp [erase the gif extension]
      i ["insert"]
      png
      esc
      0 [go back to the beginning of the line]
      j [move down a line]
      q [quit the macro]
      10@1 [do that ten times]
      1G [go back to the first line]
      q1iconvert j0q10@1 [insert a bunch of converts] :wq [save and quit]
      bash> sh dothis

      It looks more complicated than it is. Each step is simple and easy. It's only when you write it all down that it looks hard. The whole point of vi(m) is to stay the hell out of the way and let you move things around as easily as possible.

      --

      As my father lik@(munch munch)... ....
    29. Re:My history with VIM by DugzDC · · Score: 1

      Nice of the guy to use an editor that you'll "hate for two weeks" on a two week course. Kermit the Bastard, eh?

      I like vi(m). Sleek.

    30. Re:My history with VIM by Sithgunner · · Score: 1

      Still wrong to me after 2 years, what's up with that?

    31. Re:My history with VIM by pandrijeczko · · Score: 1
      My response to you would be to simply not use Vi/Vim if you have no real need to do so.

      One of the nice things about Vi/Vim is that it's a "constant" in an ever changing UNIX universe - it's on just about every UNIX system there is so no matter whether you have to work on Linux, Solaris, AIX, etc., Vi/Vim works just about the same way on all of them.

      Because I have worked on different UNIX flavours throughout my career history, learning Vi has been a necessity to the point where I personally can edit files in it faster than I can in any other text editor. Consequently, it's my preferred editor even on Windows XP.

      However, if you only work on Linux machines and you're more used to "traditional" text editors, then nano, pico or a host of other editors might suit you better.

      Nobody should use a piece of software because it's "cool" or "fashionable" - but just because it's a tool that helps you get a job done quicker. There are people who make Emacs/Vi comparisons constantly (especially on Slashdot) but in 20 years working on UNIX I've never had the need to use Emacs ever - yes, I'm certain Emacs is a fantastic tool and maybe some day I'll find the time to learn more about it but not for the moment.

      And from the opposite perspective, I've no wish to see Vim "dumbed down" because some people find the operation of Vim to be difficult. If they want to install add-ons that give them menus and mouse functionality then good luck to them (as long as they remember that they won't usually have those add-ons on standard UNIX systems so there is a *great danger* of being too dependent on them) but I certainly don't want major functional changes made to Vim to the point where it loses it's Vi compatibility.

      That would detract from the whole point of Vi.

      --
      Gentoo Linux - another day, another USE flag.
    32. Re:My history with VIM by nuzak · · Score: 1

      > For exactly the reason you mentioned, cursor placement. Insert inserts and append appends.

      And Frendibulate frendibulates. And Groofundulize groofundulizes, unless you last frendibulated the zerbitron. It's just obvious, I can't see what sort of problem you have with it. Since I will probably have to explain my point later, I'm illustrating how your explanation really told me nothing at all other than "mode 1 does mode 1, and mode 2 does mode 2" without explaining why there even should be any difference.

      Anyway, I'd forgotten that vim does indeed do insert mode pretty much the right way, having been so used to classic vi (solaris, linux rescue discs), which won't even let you erase while in insert/append mode. Makes the two modes even more nonsensical, but then again emacs has about 27 ways to do the same thing too.

      Anyway, I find vi's syntax hilighting is actually smarter than emacs's font-lock (amazingly enough) and certainly faster (not surprising) and I could see myself using vi more only if I can get some of my emacs idioms back. Two things I want: CUA behavior of shifted arrow keys, and yank/kill behavior. I routinely kill/yank in emacs to shuffle blocks of text around (you should see how I edited this post) and I like the way emacs concatenates consecutive and adjacent ctrl-k kills into the same kill ring slot. With vi, p or P will still only restores the last single line yanked with dd, not the whole block. Any way to get this sort of behavior short of using visual mode?

      --
      Done with slashdot, done with nerds, getting a life.
    33. Re:My history with VIM by Buck2 · · Score: 1

      And Frendibulate frendibulates. And Groofundulize groofundulizes

      But those are nonsense words. Vi didn't invent "insert" and "append". Those words are commonly used by people that don't know vi.

      One person suggested reducing the complexity of vi by making only one insert/append. That would eliminate a style of vi thinking, though. Insert here, append there. Insert blank line and start typing here or after this line. Paste here or after this line, word, etc.

      Why throw away this functionality?

      CUA behavior of shifted arrow keys: I don't know what that means, sorry. I assume that means highlighting, but that's done through visual mode.

      Yanking/deleting into a single register can be done by using the named registers A-Z. Anything put into those registers is appended to what's already there.

      --

      As my father lik@(munch munch)... ....
  16. :wq by joeldg · · Score: 1, Interesting


    yay.. spiffy new vim, vrs spiffy old vim..
    though, the new features do look nice.

    I actually know a guy with a ":wq" tattoo (on the back of his neck)

    1. Re::wq by SrJsignal · · Score: 1

      would have been more efficient if he had a tattoo with ZZ, just a thought though.

    2. Re::wq by Anonymous Coward · · Score: 0
      I actually know a guy with a ":wq" tattoo (on the back of his neck)


      Is that foreshadowing the force of his bosses ejaculation blowing the back of his head off?

      LOL @ tattoos

    3. Re::wq by Anonymous Coward · · Score: 0

      :x

    4. Re::wq by Anonymous Coward · · Score: 0

      I wonder what his cell mate thinks of when he sees that.

    5. Re::wq by tender-matser · · Score: 1

      fuck :wq

      use :x

    6. Re::wq by tender-matser · · Score: 1

      fuck :wq. real men use :x.

  17. "Intelligent" completion by Gopal.V · · Score: 1
    Intelligent completion for C, HTML, Ruby, Python, PHP, etc.

    I don't know why, but I've gotten used to Ctrl+[pn] and prefer that over popups that other IDEs seem to throw up.

    1. Re:"Intelligent" completion by peterpi · · Score: 1

      Me too. I hope the new feature doesn't get in the way too much. I'm interested to see how it works.

    2. Re:"Intelligent" completion by pthisis · · Score: 1

      It pretty much sucks compared to the old Ctrl-P/N stuff, but it's easy to turn off.

      --
      rage, rage against the dying of the light
  18. Vim mean... by sheepoo · · Score: 0, Troll

    Vertigo In Madness
    I still have not understood why people waste their time developing and using such pieces of software where you have to bang your head against the screen to make the editor work :)
    Like someone said: Keep It Simple Stupid
    Maybe the developer(s) of Vim should also know this

    1. Re:Vim mean... by drinkypoo · · Score: 1

      You can use vim simply. You can also use it in a more complex fashion. At least on windows, gvim (the GUI version) has a simple mode where you don't have to use vi keys to get things done, and there's a ton of functionality available in the menus. At the same time, it tells you what you would have typed on the keyboard to make it happen (kind of like smit) so it's training you to use the faster method. Vim is my personal hero in editing land.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    2. Re:Vim mean... by MasterShake · · Score: 1

      If you don't like vi(m) then, *cough* DON'T USE IT! I could say exactly the same things about emacs. It's all a personal choice, I for one can't stand the non-vi model of editing.

      As for intuitivness, maybe I don't want every keystroke bound to some rediculous command.

      -ms

      --
      C-u followed by a character which is neither a digit nor a minus sign has the special meaning of "multiply by four."

      http://www.delorie.com/gnu/docs/emacs/emacs_29.htm l

    3. Re:Vim mean... by h4rm0ny · · Score: 3, Insightful


      Typing with two fingers is simpler than trying to remember which of the "correct" fingers go on which keys. But take the time to learn it properly and you can type far faster than you ever did before, even if there's a temporary drop in speed while you learn.

      It's the same with Vi. Even if you don't learn everything that it can do, the simple fact that I can do all the major operations without having to use a bloody mouse is a plus for a touch-typist like myself. Vi is very small, very quick and very powerful. The learning curve is worth it.

      --

      Aide-toi, le Ciel t'aidera - Jeanne D'Arc.
    4. Re:Vim mean... by wootest · · Score: 1

      I use emacs. *However* I don't use emacs because it has 'every keystroke bound to some ridiculous command', but because it's as close to an actual sane editor that I can get. I get how some people can get along just fine and probably be more productive with vi than with emacs, but I'm not one of them.

      What I want is this: pico/nano with regex search and replace. Does anyone have any idea of where to get that?

    5. Re:Vim mean... by Anonymous Coward · · Score: 0

      the simple fact that I can do all the major operations without having to use a bloody mouse is a plus for a touch-typist like myself

      You hit the nail on the head. Vi(m) default key bindings make it easy to perform common text operations without having to leave the homerow to fiddle with the mouse (or arrow keys). Compare those keybindings to something like Emacs default key bindings (ctrl-v page forward, meta-v [usually ESC-v] page back?!?!?!) and you have to wonder what they were smoking when they picked those defaults. To its credit though - Emacs is more extensible and has viper mode for vi emulation.

    6. Re:Vim mean... by Anonymous Coward · · Score: 0

      There's a version of nano with regex search and replace...it's called nano. Apparently you might have to invoke it with the -R flag, but I've never needed to.

    7. Re:Vim mean... by Anonymous Coward · · Score: 0

      Typing with two fingers is simpler than trying to remember which of the "correct" fingers go on which keys. But take the time to learn it properly and you can type far faster than you ever did before, even if there's a temporary drop in speed while you learn.

      That can be easily tested, and is true.

      It's the same with Vi. Even if you don't learn everything that it can do, the simple fact that I can do all the major operations without having to use a bloody mouse is a plus for a touch-typist like myself.

      Has anybody done any testing to see if people are in fact faster with vi's commands than, say, Emacs' or Jedit or Visual Studio or what-have-you? I've seen multiple studies that show that keyboard-only users are in fact slower than mousers, but think they're faster, because their brain is more occupied for the duration of the command. I've never seen anything remotely scientific to suggest that vi actually makes you faster.

      Vi users keep saying "it's small, it's fast, learn it, you'll be faster" as if it's obvious, but it's not at all obvious.

      Vi is very small, very quick and very powerful. The learning curve is worth it.

      And there you go. Considering that everybody who says "the learning curve is worth it" is a vi user, there's a bit of self-selection going on: couldn't it be true, at least in some cases, that people say "it's worth it" to justify their own time spent ice-skating up that hill?

      Here's a test for you vi users: if I said the same things about ed that you say about vi, would you spend the time learning to use ed? (It's smaller and quicker than even vi, and it's very powerful. The learning curve is worth it.)

    8. Re:Vim mean... by wootest · · Score: 1

      Wow, I never saw that. Thanks!

  19. vim plugins by kwench · · Score: 3, Interesting

    Now I'm waiting for a vim-plugin for Firefox and Opera, just like the Konqueror guys did it. So I can finally spellcheck and syntaxcheck my slashdot comments... ;-)

    1. Re:vim plugins by Bungopolis · · Score: 1
  20. Cut and Paste? by hey · · Score: 2, Insightful

    I wonder if it has a nicer way to cut and paste.
    I have always been unhappy with yank-number of lines
    or marking, etc.

    1. Re:Cut and Paste? by Anonymous Coward · · Score: 1, Informative

      Have you tried (v)isual mode?

    2. Re:Cut and Paste? by thePig · · Score: 2, Informative

      Try Esc V + use arrow keys to copy.
      Paste is usual Shift + Insert.

      Also you can use -

      Esc v -> visual mode - character wise
      Esc Cntrl+V -> Visual mode - coloumns

      Whatever is in the visual mode also copies. So very easy

      --
      rajmohan_h@yahoo.com
    3. Re:Cut and Paste? by hey · · Score: 1

      Hey that's great! Thanks.

    4. Re:Cut and Paste? by initsix · · Score: 2, Interesting

      I love vi, but I have always had a paste issue using vim. I typically use vim over ssh from a windows machine. I run into problems when I switch to insert mode and paste from (Windows) clipboard. Vim likes to insert a tab on every new line.

      I end
                up with text
                          that tends to format
                                        like this.

      It is very annoying and I end up either trying to find an old school vi binary or use pico or the old cat > foo.txt trick. Does anyone have any idea to stop the auto indent feature?

    5. Re:Cut and Paste? by AveryT · · Score: 2, Informative

      1. position cursor on the first line you want to cut/copy
      2. mx (create mark "x")
      3. position cursor on the last line you want to cut/copy
      4. y'x (yank from mark "x" to current)
        or
      4. d'x (delete from mark "x" to current)

      x can be any letter from a to z

    6. Re:Cut and Paste? by Anonymous Coward · · Score: 0

      :set paste

    7. Re:Cut and Paste? by Anonymous Coward · · Score: 0

      :help paste

    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. Re:Cut and Paste? by Anonymous Coward · · Score: 2, Informative

      For a permanent fix, comment out the line with 'set autoindent' in /etc/vim/vimrc

    10. Re:Cut and Paste? by chepner · · Score: 1

      Read up on paste mode -- :help paste

      It's designed to work nicely with copy-pasted text from elsewhere.

    11. Re:Cut and Paste? by thePig · · Score: 2, Informative

      for VIM, I found that it comes default with autoindent and smartindent switched ON.
      Just set it OFF. :se noai nosi

      And try the same.

      --
      rajmohan_h@yahoo.com
    12. Re:Cut and Paste? by Anonymous Coward · · Score: 1, Informative

      :h v

    13. Re:Cut and Paste? by dlbornke · · Score: 1

      Mark the inserted text and press '='
      That indents the marked text ... if it is normal text, it will just remove the spaces at the start. If it is C code (or some other language's), it will do correct indenting.

      gg=G

      will indent the whole file (especially useful for crappy formatted XML data).

    14. Re:Cut and Paste? by Anonymous Coward · · Score: 0

      Three methods which may appeal to you then:

      Yank-to-match: Typing "y/pattern" will yank all lines to matching pattern.

      Yank-to-document-element: the move by word, line, sentence, and paragraph characters 'w', '+', ')', and '}' can be used with yank. So "y}" yanks an entire paragraph, often a useful unit of text. Number modifiers can be used: "2y}" is two paragraphs, etc.

      Mark-and-yank. Navigate to the start of a region, "ma", end, "mb", back to start "'a", and yank to end of region: "'b". Much faster done than said.

      The visual edit stuff is there but I rarely touch 'em.

    15. Re:Cut and Paste? by RevDiaBLo · · Score: 1

      Before you paste, turn on paste:

      :set paste

      Then go to insert mode and paste your little heart out. When you're done, turn paste off:

      :set nopaste

    16. Re:Cut and Paste? by condition-label-red · · Score: 1

      This is because of the auto indent feature. Try:

      :set noai

      or equivalently:

      :set noautoindent
      --
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
    17. Re:Cut and Paste? by Splab · · Score: 1

      set pastetoggle=

      When in insert mode just hit F9 and it switches to paste mode. F9 again and you are back to normal insert.

    18. Re:Cut and Paste? by legLess · · Score: 1
      Put this in your ~/.vimrc (on Windows it's still called "vimrc" I think, but I don't know where it's kept):
      set pastetoggle=
      This will cause F6, in any mode, to switch between paste mode and regular mode. Just what you need. You can set the key to anything. Do ":help pastetoggle" in vim for more info.
      --
      This isn't as much "normalization" as it is "don't take so many drugs when you're designing tables."
    19. Re:Cut and Paste? by Anonymous Coward · · Score: 0

      in addition to the 'paste' and 'ai' options, there's also the code autoformatter if you're pasting functions. move the cursor to the function's opening { and hit '=%'.

    20. Re:Cut and Paste? by chiphart · · Score: 1
      ...is autoindent turned on for you?

      Often, when c+p-ing from another app, I simply have to:
      <esc>:set noai
      before pasting. You can turn it back on easily:
      <esc>:set ai
      --

      ...if I wanted to read garbage like that, I'd go to \.
    21. Re:Cut and Paste? by Matt+Perry · · Score: 1
      You could probably map that to a shortcut if you wanted to make it quicker.
      :set pastetoggle=<F11> is what you want.
      --
      Slashdot: Failed Car Analogies. Amateur Lawyering. Anecdote Battles.
    22. Re:Cut and Paste? by toneh · · Score: 1

      VIM has had visual mode for quite some time. There're 3 types:
      Visual mode(v), Visual line mode(V) and Visual block mode(C-v)

      I think Visual line mode will be perfect for what you want.
      Type V, then go down some lines(with j or Down), then y.

      (Don't underestimate VIM. :))

      Regards

    23. Re:Cut and Paste? by swarsron · · Score: 1

      set pastetoggle=

      is useful for turning 'paste' on and off

    24. Re:Cut and Paste? by swarsron · · Score: 1

      *grrr* not using "code"-mode ...

      set pastetoggle=<insert>

      is useful for turning 'paste' on and off

  21. No Mac Version 7 by nerotik · · Score: 0

    There is no version 7 for Mac available yet.

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

  22. On OS X, it's all about SubEthaEdit by spud603 · · Score: 2, Informative

    For years I tried to indoctrinate myself with vi, too.
    Then i found SubEthaEdit for mac os x.
    I've really found no need for anything else since. I highly recommend anybody on an apple try it out. I feel like it follows the philosophy of vi (lightweight, responsive, simple, functional), but integrates well with the rest of the OS (uses apple's spell check, plays well with os x services and keyboard shortcuts). and, though i know this isn't for everyone, it follows apple's emacs-style ctrl-f, ctrl-b, etc navigation.

    1. Re:On OS X, it's all about SubEthaEdit by caseih · · Score: 3, Funny

      Sure but SubEthaEdit has a very annoying and on-going bug that the developers cannot seem to reproduce or fix. Invariably, SubEthaEdit litters my code with random ":" and sometimes ":w". It's very annoying. Occasionally I see other random sequences appear like "gg", "yy", "dd", and "x".

    2. Re:On OS X, it's all about SubEthaEdit by Anonymous Coward · · Score: 0

      If you like SubEthaEdit, you should try TextMate. It's hands down the best editor I've ever used (and yes, I did try (x)emacs and vim).

    3. Re:On OS X, it's all about SubEthaEdit by BenjyD · · Score: 1

      Agreed, Textmate is the only editor I use now, after years of cycling through everything from Vi(m), (X)Emacs, xedit, gedit, SCiTE to jEdit. Projects, snippets and completion, type-ahead find for filename completion, it has everything. The only annoyance is the slow performance of large projects on network volumes, but that should be fixed in the next version.

    4. Re:On OS X, it's all about SubEthaEdit by netsrek · · Score: 1

      I've been converted to the TextMate religion as well. It's easy to use at a beginner level, and ultimately extensible for power users. I've even started using it for Objective-C instead of XCode... some of the tab-completing snippets in the ObjC bundle have done wonders for my productivity...

      --

      i don't read slashdot anymore.
    5. Re:On OS X, it's all about SubEthaEdit by suwain_2 · · Score: 1

      FWIW, I've seen this happen in other editors, including Microsoft Word.

      Must me some sort of virus that only vi(m) is immune to? Just a guess.

      --
      ________________________________________________
      suwain_2 :: quality slashdot p
    6. Re:On OS X, it's all about SubEthaEdit by Goo.cc · · Score: 1

      I'm with you on SubEthaEdit. It is not for everyone, but I do like it.

  23. slightly different paradigm by everphilski · · Score: 4, Interesting

    The paradigm is different that most other editors. Most other editors use control keys (of some sort) for functions. Vi you enter into edit mode and type away, then leave edit mode and operate on your work. It is a different concept but it has its advantages. (For one: Except for capital letters I've never had to press two buttons at once, ever ... you escape to exit your edit mode and then it is all single key sequences to do what you want. Simple things but, for example, hitting the control button requires shifting your hand in an akward position wheras :w you don't have to move whatsoever ... )

    1. Re:slightly different paradigm by eddy+the+lip · · Score: 1
      Except for capital letters I've never had to press two buttons at once, ever...

      Which is why I switched from emacs. Ever tried coding in emacs with a broken wrist? It's hard enough with two functional hands.

      --

      This is the voice of World Control. I bring you Peace.

    2. Re:slightly different paradigm by johansalk · · Score: 1, Informative

      Typing in vim is okay, but I found waaaay to tedious and distracting, nevermind it being incredibly frustrating and annoying, switching in and out of modes to move about and edit stuff here and there. My editor of choice now is Scite. You can't beat the simplicity of c-x, c-c, or c-v for editing and the cursor keys for moving about. I don't care if vim has 10,000 other features, I use only those ones I mentioned for perhaps 99.9% of everything I do.

    3. Re:slightly different paradigm by mypalmike · · Score: 1

      Except for capital letters I've never had to press two buttons at once, ever ... for example, hitting the control button requires shifting your hand in an akward position wheras :w you don't have to move whatsoever

      Please explain how you manage to type ":" without pressing two buttons at once.

      --
      There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
    4. Re:slightly different paradigm by hackstraw · · Score: 2, Informative

      Except for capital letters I've never had to press two buttons at once, ever

      ^X^F in insert mode to complete files. Gotta have it. Better than trusting my fingers, and takes less typing.

    5. Re:slightly different paradigm by abiessu · · Score: 2, Interesting

      It is that huge chasm between 'edit' and 'command' modes, along with the "optimizations" in command mode that are geared towards the QWERTY keyboard layout (HJKL for movement? not so easy/intuitive in Dvorak-* layouts...) that keep me away from vi. By 'chasm', I mean the fact that you have to jump all the way to the escape key and then come back. And what about being in command mode and (accidently) trying to enter text? Suddenly you've just executed some set of commands (which can presumably be undone), but you don't necessarily realize it right away. Oh... and if your only complaint is that the Ctrl key is difficult to reach, why not remap it in place of Caps Lock (or just switch the mapping of the two)?

      I'm not going to claim that emacs is the epitome of greatness, nor that vi is evil. It's just that emacs seems to work a lot better for me than vi does.

      --
      Let S_n = {nst+us+vt : s,t in Z \ {0}, u,v in {-1,1}}. For all n in Z where |n| > 2, Z \ S_n is infinite... right?
    6. Re:slightly different paradigm by hackstraw · · Score: 2, Insightful

      You can't beat the simplicity of c-x, c-c, or c-v for editing and the cursor keys for moving about. I don't care if vim has 10,000 other features, I use only those ones I mentioned for perhaps 99.9% of everything I do.

      Cut, copying, and pasting others' code :) What a job!

      Sure, ^S is simple. But then you are in "the mercy of the editor" mode. Then your editor is going to ask you, "Do you want to save your changes?" "Do you really want to overwrite the file?" "Are you really, really sure you want to save this file?" "What filename do you want?"

      In vim, I can do ":w newfilename". ":q!" ":w!" ":wq!" or what have you. I'm in control, not my editor.

      Moded editing is "strange", but all editors have it. When you're doing finds or search and replaces, like it or not, you're in a different mode. Emacs has "^" mode, and a certain "^" sequence to get out of it.

      Its just that vi[m]s modes are more powerful and discrete.

      I guess I am religious about my editor, because its my editor and I know how to use it, and it gets the job done. But I don't push my religion on anybody. I tell new *NIX people, you have to learn a editor. Its imperative. I don't care if its pico or sed. You have to know an editor. It kills me when people get all "emacsy" on me and they only use it because they know 3 or 4 features, and the arrow buttons work. I work with an emacs guy that uses vim for macros because they are so easy to do, and then goes back into emacs for typing.

      I have _never_ met an emacs user that knew how to use it. Its sad.

    7. Re:slightly different paradigm by notreallynas · · Score: 1
      (For one: Except for capital letters I've never had to press two buttons at once, ever ... you escape to exit your edit mode and then it is all single key sequences to do what you want. Simple things but, for example, hitting the control button requires shifting your hand in an akward position wheras :w you don't have to move whatsoever ... )
      Please do tell me how you get the ":" without hitting two keys at the same time. You must have a very special keyboard.
    8. Re:slightly different paradigm by Coryoth · · Score: 1

      Which is why I switched from emacs. Ever tried coding in emacs with a broken wrist? It's hard enough with two functional hands.

      I broke my thumb (my whole hand was swollen and immobile) and had to work in Emacs. 10 minutes after arriving at work I had successfully rebound the keymap (doing so one handed, changing keybindings as they came up) so that I could operate it efficiently one handed. I'm not sure how easy that would be with vim (not being a vi person), but the ability to quickly dynamically rebind any keys I needed as I went certainly made things easy in Emacs.

      Jedidiah.

    9. Re:slightly different paradigm by Anonymous Coward · · Score: 0
      You wrote:
      ...By 'chasm', I mean the fact that you have to jump all the way to the escape key and then come back...
      ...Oh... and if your only complaint is that the Ctrl key is difficult to reach, why not remap it in place of Caps Lock...
      Take your own advise, remap ESC to CapsLock.
    10. Re:slightly different paradigm by mypalmike · · Score: 1

      Sure, ^S is simple. But then you are in "the mercy of the editor" mode. Then your editor is going to ask you, "Do you want to save your changes?" "Do you really want to overwrite the file?" "Are you really, really sure you want to save this file?" "What filename do you want?"

      Umm, no. Just ctrl-s. I think notepad is the only editor I've seen with the problem you describe.

      In vim, I can do ":w newfilename". ":q!" ":w!" ":wq!" or what have you. I'm in control, not my editor.

      Open vi without a filename, insert some text, then ":wq!". I see "E32: No file name", and I'm still in the editor. I thought q! meant "really quit". SciTE recognizes that I want to save a file that I haven't named yet. So, ctrl-s filename. WorksForMe.

      --
      There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
    11. Re:slightly different paradigm by robocord · · Score: 1

      Remember: you can't spell evil without vi!

    12. Re:slightly different paradigm by dar · · Score: 1

      As mentioned above, you do not have to press the escape key. You just have to enter an escape. ^[ (Control-[) enters an escape character. That's the ascii definition of that sequence. Just like ^G is bell and ^H is backspace, ^[ is escape.

      http://www.robelle.com/smugbook/ascii.html gives the full set.

      --
      My other Slashdot ID is much lower.
    13. Re:slightly different paradigm by eddy+the+lip · · Score: 1

      Y'know, foolishly enough, that never occurred to me. I'll blame the painkillers. I used to like emacs a lot, and probably still would if I switched back. Of course, I also like trying out new editors, so having a ready excuse didn't bother me too much./p>

      I'll probably stick to the vim side of the fence unless some really compelling reason to switch comes up, if only to preserve my monstrous .vimrc ;)

      --

      This is the voice of World Control. I bring you Peace.

    14. Re:slightly different paradigm by Coryoth · · Score: 3, Interesting

      I have _never_ met an emacs user that knew how to use it. Its sad.

      That's sad, because someone who truly knows how to get the most out of Emacs can be very impressive. Most of the people I know don't really know how to use vi. Sure they can do i for insert, and dd for delete line and so forth, but they hardly use the full feature set. Of course I have witnessed a few people who really know how to use vi, and that is something to behold. A real Emacs user is no different. Just because you haven't met one doesn't mean they don't exist (I've met many myself).

      Jedidiah.

    15. Re:slightly different paradigm by Azar · · Score: 1

      Umm, no. Just ctrl-s. I think notepad is the only editor I've seen with the problem you describe.

      I think the GP was exaggerating just a smidge. I don't know of any modern program that bugs you with that many prompts. Older versions of WordPerfect (i.e. up through at least 5.x) would do this. "Do you want to save this file (Y/N)?" "Are you sure (Y/N)?". Why would you ask me if I was sure, if you just prompted me and I agreed? Annoying...

      I think he was actually alluding to a completely different behavior. You want to save your changes and immediately exit from editing a file. On modern word processors / text editors you can do it one of two ways:
      1) Ctrl-S. Enter filename. Click Save. Click the X (or Ctrl-W, etc) to close the program.
      2) Click the X to close the program. Get prompted "Would you like to save your changes?" Click "OK". Type filename. Click Save.

      In vi type ":wq <filename>" and you're done. vi/vim are archaic and non-intuitive to those unfamiliar with them. Those who familiarize themselves with them can become quite efficient. I personally do like certain GUI based editors (jEdit for one) and will use them a lot of the time. But for an ssh connection or working through the console, vim is my first choice. And since most of my programming for work is done through an SSH connection, I'm in vi more often than not.

      Open vi without a filename, insert some text, then ":wq!". I see "E32: No file name", and I'm still in the editor. I thought q! meant "really quit". SciTE recognizes that I want to save a file that I haven't named yet. So, ctrl-s filename. WorksForMe.

      Well, the command ":wq!" doesn't really make sense. It's really no different from ":wq". It's saying "Write the file to disk, then force quit". Using ":q!" means "force quit, without saving or asking me anything". So it's kind of contridiction.

      But it's sounds as if you are bringing up an issue with vi that doesn't really exist. Open a new file in SciTE and enter some text. Hit Ctrl-S, don't enter a filename, and click "Save" (if it's not greyed out). Does it automagically choose a filename for you and save the file? No, it won't allow you to save until you've chosen a filename. Vi is doing the exact same thing, that's all. SciTE has provided you with a visual dialog box where you enter the filename and click save; vi expects you to type it in when you ask to write the file. Same thing, different methods. That fact that you're telling it to force the action (:wq!) doesn't mean it knows what file you want to save it as.

    16. Re:slightly different paradigm by syzler · · Score: 1

      (For one: Except for capital letters I've never had to press two buttons at once, ever ... ...hitting the control button requires shifting your hand in an akward position wheras :w you don't have to move whatsoever

      On my keyboard I have to hit both the shift key and the ':' key in order to type a ':' character otherwise I just type a ';' character.

      So instead of a simple ctrl+key in other editors, you must now type ESC shift+':' 'w' in order to save the file. It looks to me that in vi you type four key strokes and two have to be pressed at the same time whereas emacs which is just ctrl+key is two key strokes less.

      I really like vi for the features it provides, however less key strokes is not necessarily one of the selling points.

    17. Re:slightly different paradigm by Anonymous Coward · · Score: 0

      >Well, the command ":wq!" doesn't really make sense.
      It just points out that it is very easy to specify contradicting commands that do not make it easier for beginners.
      If you have to do a lot of sophisticated text editing, you get quite some advantage using an "efficient" editor like vi. Efficiency comes at the price of learning a lot of commands and gaining quite some expertise. (And it is easy to forget... i "forgot vi" at least 3 times in my life, caused by different jobs requiring different tools)
      When it comes to programming, thinking about the simplest and most elegant solution for a given problem tends to take up most of the time (at least in my case) and the overall speedup gained with a vi like editor tends to converge to nil (given the learning overhead).
      For editing SSL vi is hard to beat though.

    18. Re:slightly different paradigm by Anonymous Coward · · Score: 0

      ':' is just a capital ';', silly.

    19. Re:slightly different paradigm by mypalmike · · Score: 1

      And you press "SHIFT-;" to achieve this. Two keys. My question stands.

      --
      There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
    20. Re:slightly different paradigm by mypalmike · · Score: 1

      I think he was actually alluding to a completely different behavior. You want to save your changes and immediately exit from editing a file. On modern word processors / text editors you can do it one of two ways:
      1) Ctrl-S. Enter filename. Click Save. Click the X (or Ctrl-W, etc) to close the program.
      2) Click the X to close the program. Get prompted "Would you like to save your changes?" Click "OK". Type filename. Click Save.

      In vi type ":wq " and you're done.


      There's no need for mouse clicks. Indeed, fewer keystrokes are needed in SciTE (or any modern text editor) than in vi.

      SciTE: "^S ^W [I'm] [already] [done]"
      vi: "ESC : w q "

      The "vi is more efficient" arguments are tiresome, and generally wrong. Vi is about as efficient as any other text editor.

      vi/vim are archaic and non-intuitive to those unfamiliar with them. Those who familiarize themselves with them can become quite efficient. I personally do like certain GUI based editors (jEdit for one) and will use them a lot of the time. But for an ssh connection or working through the console, vim is my first choice. And since most of my programming for work is done through an SSH connection, I'm in vi more often than not.

      Agreed, vi is definitely useful for editing over console ssh connections.

      Well, the command ":wq!" doesn't really make sense. It's really no different from ":wq". It's saying "Write the file to disk, then force quit". Using ":q!" means "force quit, without saving or asking me anything". So it's kind of contridiction.

      My thoughts exactly. It was one of the gp's examples.

      But it's sounds as if you are bringing up an issue with vi that doesn't really exist. Open a new file in SciTE and enter some text. Hit Ctrl-S, don't enter a filename, and click "Save" (if it's not greyed out). Does it automagically choose a filename for you and save the file? No, it won't allow you to save until you've chosen a filename. Vi is doing the exact same thing, that's all.

      The SciTE approach takes fewer keystrokes and prompts me for a filename. The vi approach just tells me my whole command failed (or maybe just part of it?) and I have to try again. Not exactly the same thing, but similar.

      --
      There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
    21. Re:slightly different paradigm by mypalmike · · Score: 1

      Oops. HTML-stripping screwed up my keystroke example.

      SciTE: "^S filename enter ^W" = 3 keystrokes + filename
      vi: "ESC : w q space filename enter" = 6 keystrokes + filename

      --
      There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
    22. Re:slightly different paradigm by kbielefe · · Score: 1
      Vim is one of those things that is only worth doing if you do it completely. You only get the benefit after a lot of initial investment in learning more efficient ways of doing things that you must use select/c-x/c-v for in other editors.

      I constantly get frustrated in other editors by the lack of efficient commands to do something as simple as delete everything from here to the end of the sentence ("dt." in vim), for example. That's why I use vim to type all my forum posts, like this one, then paste it into my web browser.

      My university had a short required vi class, but I didn't use it much until I was reintroduced to it a few years later in a corporate training class on perl. The teacher's editor seemed to read his mind. The class was hard to follow sometimes because he would frequently say something like, "Move those 3 lines to the end of the other function," and it would be done before he was finished saying it. And he was slowing down for the benefit of the class.

      That impressed me enough to give vi another try, and 10 years later, it is as natural as touch typing, yet I still occasionally learn better ways to do something.

      --
      This space intentionally left blank.
    23. Re:slightly different paradigm by Anonymous Coward · · Score: 0

      sticky keys

    24. Re:slightly different paradigm by rikkitikki · · Score: 1

      By 'chasm', I mean the fact that you have to jump all the way to the escape key and then come back.


      Sounds like you could use one of the old HP keyboards they used to ship with their HP/UX workstations. The ESC key was on the same row as the number keys (I think it was next to the tilde).

      A story I heard was that when the keyboard was being designed, someone asked why the ESC key was there...the response was that, "Unix users need the ESC key real close." :-)
    25. Re:slightly different paradigm by fingusernames · · Score: 1

      The teacher's editor seemed to read his mind. The class was hard to follow sometimes because he would frequently say something like, "Move those 3 lines to the end of the other function," and it would be done before he was finished saying it. And he was slowing down for the benefit of the class.

      I once found somebody who described the motto of vi as "The moving finger writes and having writ moves on." It's a line from an ancient Persian poem (apparently mis-translated), but it aptly evokes vi -- vi is fluid, writing and editing flow into one constant and, eventually, natural motion of the fingers. I've used vi for nearly twenty years now, and it's amusing how often people watching me edit text are amazed at the speed which which I do it.

      Larry

    26. Re:slightly different paradigm by fingusernames · · Score: 1

      And what about being in command mode and (accidently) trying to enter text? Suddenly you've just executed some set of commands (which can presumably be undone), but you don't necessarily realize it right away.

      Once you've used vi a few times, that simply doesn't happen. Your mind easily keeps track of what you're doing. I've used vi for nearly 20 years now, and I cannot recall the last time I did that, if ever. Probably 19 years ago.

      Larry

    27. Re:slightly different paradigm by hoskeri · · Score: 1

      Open vi without a filename, insert some text, then ":wq!". I see "E32: No file name", and I'm still in the editor.

      Thats because you asked it to write a file.
      You could have said :q! and you would have been fine.

      --
      Even if you win the rat race, you are still a rat
    28. Re:slightly different paradigm by soliptic · · Score: 1
      Sure, ^S is simple. But then you are in "the mercy of the editor" mode.

      What rubbish!

      Then your editor is going to ask you, "Do you want to save your changes?"

      No it won't, pressing ^S IS saying "I want to save my changes". I've never, ever met a piece of software that double checks if I'm sure when I press ^S.

      "Do you really want to overwrite the file?"

      No it won't. ^S saves to the current file, overwriting. Unless the file is read only on the filesystem in whihc case you'll hit a prompt - but I expect you would have something similar with Vim. Unless you seriously think Vim should be able to ignore filesystem permissions.

      "Are you really, really sure you want to save this file?"

      No it won't. Pressing ^S saves the file. I've never, ever, EVER met a piece of software that *triple* checks if I'm sure when I press ^S -- now you're just being stupid.

      "What filename do you want?"

      No it won't. If you wanted it to ask that, you'd press ^A - for Save As.

      I really don't get it... ESC, :w is way harder than ^S - four keypresses instead of one. The only part of the ESC argument that makes sense to me is that you don't need to hold modifier keys (shift, ctrl, alt) hence awkward stretchy wrist/hand movements -- which they then instantly undermine by requiring a : which you can't type without..... holding shift. Fantastic.

    29. Re:slightly different paradigm by Breakfast+Pants · · Score: 1

      Shift-end delete.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    30. Re:slightly different paradigm by Breakfast+Pants · · Score: 1

      not only that, what you really have to do is hit escape, shift+;, w, enter, and finally i to be back in edit mode. 6 keys to save your file in edit mode and return to edit mode. Insane.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    31. Re:slightly different paradigm by kbielefe · · Score: 1

      Great. If you start a new line after every sentence.

      --
      This space intentionally left blank.
  24. Shhhhh! by Anonymous Coward · · Score: 0
    [Esc]:q!

    Shhh...We can't be giving the noobs a warning about not saving their file now.

  25. My favorite editor by bennomatic · · Score: 4, Funny
    When all the other websites were putting badges on saying, "made with dreamweaver", or "made with go-live", or whatever, I made the following for my site:
    made with vi

    --
    The CB App. What's your 20?
    1. Re:My favorite editor by halfnerd · · Score: 1

      You're not the first one: http://thomer.com/vi/anim_written_in_vi.gif . (And unfortunately for you, I prefer this one)

    2. Re:My favorite editor by vga_init · · Score: 1

      Aye aye! Here's mine.

    3. Re:My favorite editor by Anonymous Coward · · Score: 0

      I saw somewhere a button that said "Powered by cat and Ctrl-D". Now that's sportman's like.

    4. Re:My favorite editor by Anonymous Coward · · Score: 0

      What, are you, like, 12 or something?

    5. Re:My favorite editor by smellsofbikes · · Score: 1

      I did something similar: this website made on an amiga using VI. it looks best when viewed using the resolution and settings my computer uses. If you don't like it there are many other websites.

      My website is not particularly popular, surprise surprise.

      --
      Nostalgia's not what it used to be.
    6. Re:My favorite editor by Anonymous Coward · · Score: 0
      I just stick a really tiny

      :wq

      in the bottom-left corner of the page. Subtle.

    7. Re:My favorite editor by Anonymous Coward · · Score: 0

      What are you, like, a valley girl or something?

  26. still hungry people in Uganda by Anonymous Coward · · Score: 2, Informative

    http://www.vim.org/htmldoc/uganda.html ... while RMS could finish Hurd from his emacs fundraising

  27. Why vim is worse than vi by Anonymous Coward · · Score: 0

    It is very difficult to turn off *ALL* of the highlight features. I don't want the search highlight, syntax highlight, spell highlight, etc. As I find the config option to disable each feature, some other highlight function remains.

    It needs an option: "justlikevi=true"

    1. Re:Why vim is worse than vi by Anonymous Coward · · Score: 2, Informative
      It needs an option: "justlikevi=true"

      For vi-compatible mode try
      :set compatible
      or on the command line
      vim -C
      If it still insists on syntax highlighting type
      :syntax off
  28. More!?!?! by waif69 · · Score: 1

    I thought vim had everything one could ask for! What am I to do now, but download it and be amazed.

  29. But seriously.... by DG · · Score: 1

    But seriously, how does this work?

    DG

    --
    Want to learn about race cars? Read my Book
  30. I think it's time for a new tag by ggvaidya · · Score: 1

    realultimatepower?

  31. What about... by Anonymous Coward · · Score: 0

    I see versions for Unix, Windows, Mac, etc. What about the most important OS to run a text editor from . . . Emacs?

  32. The ESC key annoys me by ylikone · · Score: 2, Interesting

    I find continually having to use the ESC key to be highly annoying. And really, to save a file, I don't really see CTRL-S being harder or slower to type than ESC :w

    --
    Meh.
    1. Re:The ESC key annoys me by Anonymous Coward · · Score: 0

      in .vimrc:

      imap jj "less than"ESC"larger than"

      j is of course substitutable if you'd like. The effect? That's left for the reader...

    2. Re:The ESC key annoys me by Anonymous Coward · · Score: 0

      Here is a helpful tip I learned along time ago that made Vim into my editor of choice: ctrl-[ is the escape code for... well ESC. No more moving your hands off home row to switch modes. It's even better if you switch ctrl and caps lock.

    3. Re:The ESC key annoys me by cortana · · Score: 2, Informative

      I realise that this isn't going to make you jump ship, but if you find yourself on a machine with only vim, try :behave mswin. It enables windows-like shortcuts such as C-z for undo, C-s for save, C-x for cut, C-c for copy and C-v for paste. Probably more but those are the only ones I use often enough to remember.

    4. Re:The ESC key annoys me by bribobirb · · Score: 1

      You can always use CTRL-[ as an alternative

    5. Re:The ESC key annoys me by aCapitalist · · Score: 1

      Here is a post I made that gives some links to keyswapping programs. Yes, ESC sucks and that's why I swap it with Caps Lock.

    6. Re:The ESC key annoys me by Anonymous Coward · · Score: 0

      Instead of ESC, try ^C. Much faster.

    7. Re:The ESC key annoys me by stymyx · · Score: 1

      I never use ESC - CTRL-[ works exactly the same.

    8. Re:The ESC key annoys me by namekuseijin · · Score: 1

      A very, very small price to pay for much superior text editing, like copying the current line and pasting it below 3 times is just a simple "yy3p", not "HOME,SHIFT+DOWN_ARROW,CTRL+C,CTRL+V,CTRL+V,CTRL+V ,CTRL+V".

      Several other usual combinations like that in modeless text editors come down equaly slim under vi keystrokes... i know it, since i was an emacs nut...

      and yes, ZZ is way faster than CTRL+S, ALT+F4. ;)

      --
      I don't feel like it...
    9. Re:The ESC key annoys me by Anonymous Coward · · Score: 0

      Put the following in your .vimrc
          imap jj
      Which allows you to use jj instead of to leave insert mode

  33. Someone had to... by Nightreaver · · Score: 3, Funny

    Someone had to remind slashdotters of the superior editor... Ed, man!

    1. Re:Someone had to... by stinerman · · Score: 2, Funny

      The best part:

      And ed doesn't waste space on my Timex Sinclair. Just look:

      -rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed
      -rwxr-xr-t 4 root 1310720 Jan 1 1970 /usr/ucb/vi
      -rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs

  34. Re:waiting for GVIM by Anonymous Coward · · Score: 0

    I don't know about anyone else that uses Vim on Windows but I'll be waiting for GVIM version 7 so that I can upgrade. This is truly one of the best script editors I have worked with.

  35. VI is like a Stanley Kubrick movie by Anonymous Coward · · Score: 1, Funny

    The ability to become proficient with vi is a lot like being able to watch, follow, and understand a Stanley Kubrick movie. Some folks can just get it and some don't. If you were able to watch SO:2001 or AI from start to end, the very first time, and not get lost, and understand it all... then you'll probably pick up on becoming proficient at using vi/vim very quickly.

    1. Re:VI is like a Stanley Kubrick movie by msuarezalvarez · · Score: 1

      Quit OT, I guess, but anyways: SO:2001 or AI are very, very linear movies! You might want to widen your cinematic horizons a bit ;-)

    2. Re:VI is like a Stanley Kubrick movie by Vyvyan+Basterd · · Score: 1

      Except Kubric was a fantastic filmmaker and Bill Joy was just high on the brown acid.

  36. Ahhhhh.... by DG · · Score: 1

    I managed to find out some of this myself.

    This is kinda cool: define a function (or a variable, and who knows what else) and CNTL-n drops down a list of functions or variables or whatever that match the pattern to the left of the cursor.

    So it you have some_ungodly_function_name, you can type "som(CNTL-n) and autocomplete the name.

    Very nifty!

    DG

    --
    Want to learn about race cars? Read my Book
    1. 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."

    2. Re:Ahhhhh.... by Coryoth · · Score: 2, Interesting

      This feature (ctrl-n auto-complete)...You press ctrl-x ctrl-o to invoke it.

      Now forgive my ignorance because I'm not a Vim user, but I thought (and what I keep hearing) is that vim is supposed to be better than emacs because it doesn't use complicated multi-key shortcuts using the control key etc. What happened? At this rate why not just use emacs with gnuclient (for fast access) and viper mode (for your basic vi keybindings)?

      Jedidiah.

    3. Re:Ahhhhh.... by Anonymous Coward · · Score: 0
      At this rate why not just use emacs with gnuclient (for fast access) and viper mode (for your basic vi keybindings)?


      That's an immediate -5 smugness hit.
    4. Re:Ahhhhh.... by drinkypoo · · Score: 2, Insightful

      At this rate why not just use emacs with gnuclient (for fast access) and viper mode (for your basic vi keybindings)?

      Because firing up emacs in order to edit a text file is like using a backhoe to dig a post hole. Sure, you can do it with the right attachments (the auger) but you could get it done just as quickly and a lot more cheaply by just using a post hole digger. Emacs probably uses at least twice the system resources vim does (I'm not doing a comparison so I'm sticking with small statements) and most people will never want to use any of emacs' features besides text editing.

      So basically, for the average user, emacs is either the slowest-loading editor ever, or an extremely bloating text editing service (if used in daemon mode.) Loading it every time is for retards. Keeping it in memory if the only thing you're using it for is editing text files is only marginally less stupid, especially since it will periodically decide to swap itself out, and then you have to page it back in before you can edit.

      The reason that any vi-clone is "better" than emacs is the lower overhead, and the ability to do everything using typewriter keys, which are present (and typically in the same location) on every terminal. Also, you don't have these bizarre key combos that destroy your hands. I have an ex-boss who blames his carpal on emacs, now he has to use one of those kinesys keyboards that don't require wrist movement during typing, and he still can only type for about three or four hours a day total - pretty crap for a programmer. Of course, that's purely anecdotal, but it's pretty funny, if you're not him.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    5. Re:Ahhhhh.... by Tet · · Score: 1
      At this rate why not just use emacs with gnuclient (for fast access) and viper mode (for your basic vi keybindings)?

      Because basic vi keybindings aren't enough. I use probably 95% of vi's features on a regular basis, and I can't make do with less than that. The last time I tried vi emulation under emacs, I gave up in disgust because I didn't support the features I use every day.

      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
    6. Re:Ahhhhh.... by MrBlue+VT · · Score: 2, Informative
      Here's a very useful code completion mapping I use. It lets you just hit Tab in insert mode to perform the completion instead of having to do Ctrl-N or whatever. Still lets you insert regular tabs too. Just stick it in your .vimrc file.
      function InsertTabWrapper()
          let col = col('.') - 1
          if !col || getline('.')[col - 1] !~ '\k'
              return "\<tab>"
          else
              return "\<c-p>"
          endif
      endfunction
       
      inoremap <tab> <c-r>=InsertTabWrapper()<cr>
    7. Re:Ahhhhh.... by Atzanteol · · Score: 1
      Because this is something done in "insert" mode. That's pretty much the only time one needs to use control sequences. Otherwise the letter you type go into the text...

      Nobody would want to enter command mode to do text completion. It's a good compromise.

      --
      "Ignorance more frequently begets confidence than does knowledge"

      - Charles Darwin
    8. Re:Ahhhhh.... by Coryoth · · Score: 1

      That Emacs is a huge memory hog is somewhat overrated, and based on days of yore when computing resources were a lot tighter: both Kate and Gedit use more resources than Emacs, let alone something like Eclipse. I agree if all you're doing is simple editing of lots of little text files which requires no signficant extra functionality then vim would probably be good, but so would joe or nano for that matter.

    9. Re:Ahhhhh.... by T-Ranger · · Score: 1

      Spoken like someone who has never dug, by hand, more then one posthole in an enviroment with a 3foot frost line.

    10. Re:Ahhhhh.... by drinkypoo · · Score: 1

      The fact is that joe and nano are feature-light. There is no such thing as a simple editing job. The tool that lets me get things done most quickly, preferrably without switching between a bunch of different tools, is the best. It explains the wide success of perl (the quickest way to do complicated text mangling) and it also explains the venerability of vi and its clones. It's true that the learning curve is among the steepest around, but it also has huge benefits. Just being able to do regular expressions is worth the effort.

      When I install a Unix system, I make sure that both an older vi (small, light, fast) is available, as well as vim. I do not install any other editors, although I do not remove system default editors, either.

      Worst-case, if I'm on some truly bizarre terminal, I can always degrade to ed. I could use that if I had to do it on a teletype. Wouldn't be my first choice, but it's always an option... so from that standpoint, knowing how to use the ed/vi keys is a huge bonus :)

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    11. Re:Ahhhhh.... by drinkypoo · · Score: 1

      Amen, nor do I plan to. Ever. Mostly because I never plan to live in an environment like that. It never ceases to boggle my mind how people will live in any inhospitable environment... Just because you can do a thing doesn't mean you should :)

      But anyway, I specifically said a post hole :D

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
    12. Re:Ahhhhh.... by Anonymous Coward · · Score: 0

      Fun! Although this seems to love scanning every damn file in my Perl distribution whenever I tell it to autocomplete some words... :) Oh well.

    13. Re:Ahhhhh.... by Shillo · · Score: 1

      > Emacs probably uses at least twice the system resources vim does (I'm not doing a
      > comparison so I'm sticking with small statements) and most people will never want
      > to use any of emacs' features besides text editing.

      OK, so I am doing a comparison:

      miro      7213  7.0  0.9  13552  9744 pts/0    RN   23:35   0:01 emacs foo.c
      miro      7106  1.4  0.7  16340  7704 pts/0    T    23:32   0:00 vim foo.c
      miro      7098  0.8  0.9  21008 10036 ?        SNs  23:32   0:00 gvim foo.c

      This is with GNU Emacs 21.4.1 and vim 6.4. vim is non-GUI version, gvim is the
      gtk version.

      That said, I use both Emacs and Vim. Emacs because I use that to edit code, Vim
      because Emacs does take a bit to start, and when I'm impatient or in a remote
      shell, Vim is expedient. However, saying that Emacs is bloated compared to Vim
      is just false. Vim isn't Vi.

      --
      I refuse to use .sig
    14. Re:Ahhhhh.... by Trogre · · Score: 1

      Coryoth said:
      That Emacs is a huge memory hog ...

      Agreed 100%

      I know, I know I'm quoting you out of context but you must've smiled a bit...

      --
      "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
    15. Re:Ahhhhh.... by drinkypoo · · Score: 1

      Well, that's quite an eye-opener. Of course, I'll still be using vim, because I don't know emacs anyway - back when I was learning vi, I was on systems with no more than 8MB RAM :) And as always, on some little turd of a Unix system that I'm messing with only from a hobbyist standpoint, it'll come with good ol' /bin/vi.

      --
      "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  37. You mean ed users by Cleveland+Steamer · · Score: 5, Funny

    From: patl@athena.mit.edu (Patrick J. LoPresti)
    Message-ID:
    Sender: news@athena.mit.edu (News system)
    Subject: The True Path (long)
    Date: 11 Jul 91 03:17:31 GMT
    Path: ai-lab!mintaka!olivea!samsung!zaphod.mps.ohio-stat e.edu!think.com!snorkelwacker.mit.edu!bloom-picayu ne.mit.edu!athena.mit.edu!patl
    Newsgroups: alt.religion.emacs,alt.slack
    Organization: Massachusetts Institute of Technology
    Lines: 95
    Xref: ai-lab alt.religion.emacs:244 alt.slack:1935

    When I log into my Xenix system with my 110 baud teletype, both vi *and* Emacs are just too damn slow. They print useless messages like, 'C-h for help' and '"foo" File is read only'. So I use the editor that doesn't waste my VALUABLE time.

    Ed, man! !man ed

    ED(1) UNIX Programmer's Manual ED(1)

    NAME
              ed - text editor

    SYNOPSIS
              ed [ - ] [ -x ] [ name ]
    DESCRIPTION
              Ed is the standard text editor.
    ---

    Computer Scientists love ed, not just because it comes first alphabetically, but because it's the standard. Everyone else loves ed because it's ED!

    "Ed is the standard text editor."

    And ed doesn't waste space on my Timex Sinclair. Just look:

    -rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed
    -rwxr-xr-t 4 root 1310720 Jan 1 1970 /usr/ucb/vi
    -rwxr-xr-x 1 root 5.89824e37 Oct 22 1990 /usr/bin/emacs

    Of course, on the system *I* administrate, vi is symlinked to ed. Emacs has been replaced by a shell script which 1) Generates a syslog message at level LOG_EMERG; 2) reduces the user's disk quota by 100K; and 3) RUNS ED!!!!!!

    "Ed is the standard text editor."

    Let's look at a typical novice's session with the mighty ed:

    golem> ed

    ?
    help
    ?
    quit
    ?
    exit
    ?
    bye
    ?
    hello?
    ?
    eat flaming death
    ?

    Note the consistent user interface and error reportage. Ed is generous enough to flag errors, yet prudent enough not to overwhelm the novice with verbosity.

    "Ed is the standard text editor." Ed, the greatest WYGIWYG editor of all.

    ED IS THE TRUE PATH TO NIRVANA! ED HAS BEEN THE CHOICE OF EDUCATED AND IGNORANT ALIKE FOR CENTURIES! ED WILL NOT CORRUPT YOUR PRECIOUS BODILY FLUIDS!! ED IS THE STANDARD TEXT EDITOR! ED MAKES THE SUN SHINE AND THE BIRDS SING AND THE GRASS GREEN!!

    When I use an editor, I don't want eight extra KILOBYTES of worthless help screens and cursor positioning code! I just want an EDitor!! Not a "viitor". Not a "emacsitor". Those aren't even WORDS!!!! ED! ED! ED IS THE STANDARD!!!

    TEXT EDITOR.

    When IBM, in its ever-present omnipotence, needed to base their "edlin" on a UNIX standard, did they mimic vi? No. Emacs? Surely you jest. They chose the most karmic editor of all. The standard.

    Ed is for those who can *remember* what they are working on. If you are an idiot, you should use Emacs. If you are an Emacs, you should not be vi. If you use ED, you are on THE PATH TO REDEMPTION. THE SO-CALLED "VISUAL" EDITORS HAVE BEEN PLACED HERE BY ED TO TEMPT THE FAITHLESS. DO NOT GIVE IN!!! THE MIGHTY ED HAS SPOKEN!!!

    1. Re:You mean ed users by colinrichardday · · Score: 1

      -rwxr-xr-x 1 root 24 Oct 29 1929 /bin/ed

      Does that mean that ed causes depressions?

    2. Re:You mean ed users by Javaman59 · · Score: 0

      >> Does that mean that ed causes depressions?

      It sure does! Try doing THAT with your wimpy vi and emacs :)

      --
      I'm a software visionary. I don't code.
    3. Re:You mean ed users by HaydnH · · Score: 1

      HEY! I still use ed you insensitive clod! I find it quite useful for some shell scripts... mainly because if I use awk, sed, ed & any other editors I can find on a system in the same script it really pisses people off that only know 1 of them ;P

      --
      Time is an illusion. Lunchtime doubly so. - Douglas Adams
  38. joe can do it by ylikone · · Score: 1

    Switching CR/LF to ^M and vice-versa is easy with joe. I have a hunch that anything that can be done with vi/vim can also be done with joe. Joe has regex also you know.

    --
    Meh.
    1. Re:joe can do it by generica1 · · Score: 1

      Yeah man, I totally love joe. I've been using that editor since when I first downloaded Linux (Slackware) over a BBS in the late nineties. It bridged the gap between my experiences with vi (which were the result of running the Waffle BBS software package) and my power-user status with that old workhorse for MS-DOS, QEdit, which was just starting to get crappy while Semware took their little tight shareware app and tricked it out to be a commercial product (which apparently is keeping them in business??)

      Joe has the simplicity of MS-DOS EDIT.COM/EXE with much, much more power, and is a nice way to get used to using a *NIX-based system; luckily it's managed to stick around in the cut-throat unix text editor marketplace *ahem*...

      --
      JUMP JUMP JUMP JUMP JUMP JUMP JUMP JUMP IRRIGATE
  39. I AM colorblind... by ylikone · · Score: 1

    but yet even I use syntax highlighting (in joe)!!! I don't understand why you wouldn't want it.

    --
    Meh.
  40. On any UNIX box vi is always there for you by rasper99 · · Score: 3, Insightful

    The best reason to know vi is that it is unsually installed on every UNIX box. It is a hoot to see someone who doesn't know vi working on a system that doesn't have emacs do cat >file

    1. Re:On any UNIX box vi is always there for you by psgalbraith · · Score: 1

      This was touted as a reason to use vi when I was in grad school nearly 20 years ago. And some some people are still suffering with vi on the off-chance that someday they will be sitting at a "terminal logged into a mainframe" that doesn't have Emacs. Except that you can install whatever you want on your own Linux computer now, as you could for the last 14 years or so.

      Ah well.

    2. Re:On any UNIX box vi is always there for you by UtucXul · · Score: 1
      This was touted as a reason to use vi when I was in grad school nearly 20 years ago. And some some people are still suffering with vi on the off-chance that someday they will be sitting at a "terminal logged into a mainframe" that doesn't have Emacs. Except that you can install whatever you want on your own Linux computer now, as you could for the last 14 years or so.

      Sometime really small, low space systems lack emacs. When I log on to my WRT54g router or my sharp zaurus, vi is the only text editor I can find (and since I never got around to learning vi very well, I usually end up doing that cat or echo to a file thing). So even as a pretty confirmed emacs user, it does happen sometimes that I wish I knew vi because emacs is missing on a system, even in 2006.
    3. Re:On any UNIX box vi is always there for you by the+eric+conspiracy · · Score: 1

      It wouldn't be so bad if it were actually vim installed on those UNIX boxes. But NOOoooOOO, it is usualy some pre-historic truly craptacular version of vi puke puke.

    4. Re:On any UNIX box vi is always there for you by ydrol · · Score: 1
      Except that you can install whatever you want on your own Linux computer now, as you could for the last 14 years or so. True but some of us have to work on other poeples machines as part of our day job. If you work on production servers for different flavours of Un*x (esp as a consultant / contractor ), then knowing your way around vi is very important.

      Not only does it waste charagable time, and put production machines at riskn, but it would SERIOUSLY dent your credibility if you have to ask the sysadmin to install some other editor because you dont know/use vi.

      Of course it would look just as bad asking for vim if only vanilla vi is installed.

    5. Re:On any UNIX box vi is always there for you by Anonymous Coward · · Score: 0
      This was touted as a reason to use vi when I was in grad school nearly 20 years ago.

      And this is why I learned vi 12 years ago; when Solaris 2.1 *shudder* came out, it didn't ship with emacs, and of course there were no emacs binaries available. Anyone who does systems work should learn vi because, yes, it was and still is all that's there.

      And some some people are still suffering with vi

      You could call it suffering, but since you describe yourself as an emacs developer in another post you could be biased. Personally, I found that for a wide variety of tasks, I was faster in vi than in emacs, so I shifted to using that. There are probably other people who also found reasons to stay with vi.

      on the off-chance that someday they will be sitting at a "terminal logged into a mainframe" that doesn't have Emacs. Except that you can install whatever you want on your own Linux computer now, as you could for the last 14 years or so.

      In fact, numerous systems ship with vi 'out of the box' and don't include emacs or other higher-level editors. I've done work on numerous AIX boxes over the last few years which only had vi, and a number of HP-UX as well. SecureClient, the slimmed and secured RedHat-based distro that Check Point uses as the preferred platform for their firewall these days, does not include anything but ed and vi. I'm sure most any 'linux appliance' you looked into would be the same.

      The fact of the matter is, vi remains the editor of choice for default installs. That's something emacs has never even been in the running for - too big. And slimmer editors like joe, jove, jive, pico, and nano have never gotten the larger whatever-share is needed to ensure the sort of ubiquity vi enjoys. Totally ignoring the power of vi - and it can be damn powerful - the fact that you can essentially rely on it being there on whatever system you touch makes it a valuable skill for anyone who does systems work.

    6. Re:On any UNIX box vi is always there for you by RPI+Geek · · Score: 2, Interesting

      I'm a fresh college grad breaking into the consulting business and the guys I work for insist that I learn vi for that exact reason. The example they gave me was: when you're sitting at a client's terminal with them breathing down your neck to make some simple changes, vi (or ed, but I won't go there) is simply the fastest way to do it, and when you do it fast enough it looks like magic to an inexperienced bystander. My preference is for the windowed editors like Crimson Editor or even Notepad, but I'm learning how important these "low level" tools can be.

      --

      - "Nobody came out that night, not one was ever seen. But Old Man Stauf is waiting there, crazy sick and mean!"
    7. Re:On any UNIX box vi is always there for you by Anonymous Coward · · Score: 0

      The best reason to know vi is that it is unsually installed on every UNIX box.

      ed is always there too. It's part of the POSIX and SUS specs (along with vi).

      http://www.opengroup.org/onlinepubs/000095399/idx/ index.html http://www.opengroup.org/onlinepubs/7990989775/xcu ix.html

    8. Re:On any UNIX box vi is always there for you by Eddie+von+Eigenvecto · · Score: 1

      That's funny, I built a Gentoo system the other day and VI was NOT installed by default. I was quite amused watching a VI-only so-called admin try to navigate his way around with Nano...admittedly, this person is an idiot but it was funny nonetheless.

      --Eddie

      "There is one true editor and RMS is it's prophet"

    9. Re:On any UNIX box vi is always there for you by Anonymous Coward · · Score: 0

      Then Gentoo is crap for not installing vi when every other system has it! : )

    10. Re:On any UNIX box vi is always there for you by ynohoo · · Score: 1

      Plus vi has that "useful" "feature" that it completely ignores RCS protection, making a nonsense of version control.

    11. Re:On any UNIX box vi is always there for you by menace3society · · Score: 1

      At least one version of vi I've used insisted on writing something to /tmp, and would quit if it couldn't. Once I had to boot from a CD-ROM and /tmp was read-nly. Thank god for ed.

  41. Stupid programmers use notepad by ylikone · · Score: 1

    Notepad is the probably the worst text editor in history.

    --
    Meh.
    1. Re:Stupid programmers use notepad by The_DOD_player · · Score: 1

      Guess you've never tried edlin...

    2. Re:Stupid programmers use notepad by neus · · Score: 1

      Yeah! Cause evryone knows Wordpad is waaaaaaaaaaaaaaaaaaaaaaay better! It just kicks Notepad's ass bit!

    3. Re:Stupid programmers use notepad by raz0 · · Score: 1

      Actually it is a lot better because it actually understands and interprets unix-style newlines correctly. I have lost count on the times I've opened a file downloaded from some *nix box via FTP in notepad and sweared as I saw the garbled output - wordpad is the solution. I can't imagine how notepad ever got to be associated with .txt files over wordpad.

    4. Re:Stupid programmers use notepad by MonoSynth · · Score: 1

      You'll be surprised by how many CS students use Notepad! When I show them Vim with syntax-highlighting they start yelling things like 'wtf??/slash? STFU n00b!1one Colors R teh l4m3!1deux' :(

    5. Re:Stupid programmers use notepad by Anonymous Coward · · Score: 0
      Sheesh, as if Windows had no better text editor than Notepad...

      Have a look at Ultraedit.

    6. Re:Stupid programmers use notepad by HermanAB · · Score: 1
      --
      Oh well, what the hell...
  42. Re:waiting for GVIM by Anonymous Coward · · Score: 1, Informative

    It's part of the vim 7.0 package, i.e., you get vim 7, you get gvim 7! Cool!

    -yagu

  43. Cool. As a Debian user... by just_another_sean · · Score: 2, Funny

    I guess I can look forward to getting a package sometime in 2007 :-)

    --
    Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
    1. Re:Cool. As a Debian user... by psgalbraith · · Score: 1

      Not that I use vim or would ever want to (I use and code for Emacs), but Debian has had it in experimental for some time:

        http://packages.debian.org/experimental/editors/vi m

    2. Re:Cool. As a Debian user... by just_another_sean · · Score: 1

      Hey thanks. I was just making a (lame) Debian joke :-) but I was actually considering grabbing source and trying it out. I'll try this instead...

      --
      Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
    3. Re:Cool. As a Debian user... by cortana · · Score: 1

      Assuming vim 7 makes it into testing in 9 days time, it will be in the Debian 3.2 (Etch) release that might just arrive in December. ;)

      If you don't want to upgrade from Stable then I suggest you want for vim 7 to enter the backports.org archive; someone will probably upload it at some point soon.

  44. Try a smaller keyboard by everphilski · · Score: 1

    My escape key is no further from the "a" key on my keyboard than the control key, and I don't have to twist my wrist :) And as another poster has already pointed out the escape key can be remapped.

    1. Re:Try a smaller keyboard by Breakfast+Pants · · Score: 1

      The remapping thing is a valid point--the "buy another keyboard" is not. If you commit to an editor, you want to use it everywhere: friend's houses, work, school, laptop (ok.. the keyboard is smaller in this case regardless), library, etc.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
  45. technical user perspective by excelsior_gr · · Score: 1
    I was looking for an editor that can can do syntax highlighting of Fortran sources (I work in the scientific field). I stumbled across Vim. It took me two days to figure it out but in the end you end up with something that fits your needs. Exactly.

    However, if its developers try to make a complete word-processor out of it, then I will would rather not upgrade to that version.

  46. code folding by Anonymous Coward · · Score: 1, Interesting

    speaking of vim, is there a way to fold all function definitions and leave the declarations and parameters intact in one go? i dont want to go to each starting { and 'zfap'.

    1. Re:code folding by lky · · Score: 1

      Look into the Autofold script.

      It only supports a few languages so far but its fairly easy to extend and the developer will work with you.

      Direct link: http://www.vim.org/scripts/script.php?script_id=92 5

  47. Version 7? by yet+another+coward · · Score: 5, Funny

    GNU Emacs is at version 21.4. Can we really trust such an immature editor?

    1. Re:Version 7? by MimsyBoro · · Score: 2, Informative

      You do know that Emacs is at version 1.21.4. They stopped using the major version number because it hasn't changed in the last couple of decades...

      --
      God made the natural numbers; all else is the work of man - Kronecker
    2. Re:Version 7? by Coryoth · · Score: 4, Funny

      You do know that Emacs is at version 1.21.4. They stopped using the major version number because it hasn't changed in the last couple of decades...

      I had heard they dropped the major version number, but I always presumed it was 0.21.4, with the expectation that Emacs would finally hit 1.0.0 once it was feature complete.

      Jedidiah.

    3. Re:Version 7? by dragonman97 · · Score: 1
      ....with the expectation that Emacs would finally hit 1.0.0 once it was feature complete.
      Oh, you mean when Hurd boots? ;)
    4. Re:Version 7? by Anonymous Coward · · Score: 0

      Emacs was probably feature complete before I was born.

      The question with Emacs is not whether I can trust it, but whether I can trust people who tell me that I want it. And the answer is always Vim!

    5. Re:Version 7? by Kaki+Nix+Sain · · Score: 1

      Feature complete? Given all the various directions that Emacs has been taken... you mean when it finally develops AI and takes control of all the computers on an planet and such, right?

      --

      (C) Kaki Sain, 2011. By reading this, you have illegally copied my property to your brain.

  48. And shockingly enough... by ylikone · · Score: 4, Funny

    ..your site looks like it was made by someone that only uses vi.

    --
    Meh.
    1. Re:And shockingly enough... by bennomatic · · Score: 1
      Yes... yours is muuuuuch nicer ;-)

      --
      The CB App. What's your 20?
    2. Re:And shockingly enough... by Cal+Paterson · · Score: 4, Funny

      A quick look at your linked site reveals the following; 91 HTML errors by the W3C html validator A horrible Mac OS X design 8 "use *"/"created by *" buttons "This site best viewed at 1024x768 or higher resolution" Links to Opera and Skype (obviously two perfect examples of good GNU/Linux software) and more a bunch of crappy amazon "paymepaymepaymepaymepaymepaymepayme" links Perhaps you should keep it down.

    3. Re:And shockingly enough... by Eric+Pierce · · Score: 1

      Hmm.... I don't think vi is to fault for his site's design strength/weakness.

      Here's a site I've been working on (still testing) coded entirely w/VIM.
      http://virtuawin.sourceforge.net/_testing/

      EP

    4. Re:And shockingly enough... by sootman · · Score: 1

      And a 'webring' link at the bottom. I didn't know they still made those. Is it 1997 again already?

      --
      Dear Slashdot: next time you want to mess with the site, add a rich-text editor for comments.
  49. Never more than one key at a time? by cicho · · Score: 1

    So how do you manage with the everpresent colon in commands?

    I know, I know, different paradigm, get used to it and all that, but whose bright idea was to require SHIFT for command-mode expressions like :q? Semi-colon I would understand, but the colon is a bit much.

    --
    "Only the small secrets need to be protected. The big ones are kept secret by public incredulity." - Marshall McLuhan
    1. Re:Never more than one key at a time? by jsveiga · · Score: 1

      I know most dinossaurs know this, but as a pre-historical information, before vi there was "ed", which was a "1-line" command line editor. People used teletypes (tty), you know, so there was no way to scroll up and down a "screen".

      vi offered a "visual" editor, for those who had the luxury of a crt terminal.

      The ":" was the way to tell vi you were issuing ed commands - not to reinvent the wheel for stuff that "ed" could do. So the "ESC" commands were "visual" commands, and the ":" commands were "ed" commands.

    2. Re:Never more than one key at a time? by jsveiga · · Score: 1

      My apologies. ed WAS not. ed IS. You probably have it on your linux default instalation.

      (and to exit, type "q" and ENTER, without the ":") ;-)

    3. Re:Never more than one key at a time? by Splab · · Score: 1

      Possibly the guy writing the software isn't using US layout on his keyboard?

      My 105 Danish keyboard has , and ; on one button and . : on another so both ; and : needs shift - and I find it easier to hit : than ; on my keyboard.

    4. Re:Never more than one key at a time? by Obfuscant · · Score: 1
      I know most dinossaurs know this, but as a pre-historical information, before vi there was "ed",

      And before either was 'teco'.

      I remember hearing that vi was programmed as a teco macro.

    5. Re:Never more than one key at a time? by the_greywolf · · Score: 1
      So how do you manage with the everpresent colon in commands?
      I know, I know, different paradigm, get used to it and all that, but whose bright idea was to require SHIFT for command-mode expressions like :q? Semi-colon I would understand, but the colon is a bit much.

      on my jp109 layout, : is on another key next to ; which requires " and ' to be elsewhere, but i find it quite easy to deal with. :)

      but on my us104 keyboards, of course, it can be a little annoying. especially switching between the two.

      --
      grey wolf
      LET FORTRAN DIE!
    6. Re:Never more than one key at a time? by jsveiga · · Score: 1

      "I remember hearing that vi was programmed as a teco macro."

      No, that was EMACS:

      From http://www.gnu.org/software/emacs/ :

      "The original Emacs implementation was written for the Incompatible Timesharing System (ITS) as a collection of TECO macros for ITS TECO. There was a custom of giving such macro packages names ending in ``mac'' or ``macs''. A further reason for choosing this particular name was that the abbreviation ``e'' was unused at the time on ITS. ? "

    7. Re:Never more than one key at a time? by jsveiga · · Score: 1

      ...and that makes what you just said a blasphemy of the highest degree, so you better watch your back ;-)

      (I'd make a religious analogy here, but nowadays it could cause an(other) international incident)

    8. Re:Never more than one key at a time? by ZzzzSleep · · Score: 1

      So in your .vimrc just put the line map ; : And that's done!

  50. Vim is for Grandparents by M4N14C · · Score: 0

    Eclipse Rules!!

  51. Come on already... by BritneySP2 · · Score: 0, Flamebait

    In case somebody didn't notice, it's the third millennium; and you people keep chewing on some creepy crap that is of a historical insterest at most...

    (OK now that I made this post, I can go back to my dumb terminal now.)

  52. Interesting... by otis+wildflower · · Score: 1

    ... When did Perl get demoted to 'etc'?

    Jes' curious...

    1. Re:Interesting... by mooingyak · · Score: 1

      Same time as Java and C++, because nobody writes any code in those languages.

      --
      William of Ockham had no beard. The most likely explanation is that it was chewed off by squirrels every morning.
    2. Re:Interesting... by Macrobat · · Score: 4, Funny
      .. When did Perl get demoted to 'etc'?

      It didn't. It's right there in '/usr/bin/' where it's been all along.

      --
      "Hardly used" will not fetch you a better price for your brain.
    3. Re:Interesting... by otis+wildflower · · Score: 1
      I thought it was in /opt/sfw/bin.. or /usr/local/bin.. or /usr/etc/bin...

      Oh, that's right, it's in
      #!/bin/sh -- # -*- perl -*- -p
      eval 'exec perl -wS $0 ${1+"$@"}'
      if $running_under_some_shell;
      Or should I use env, but env isn't installed by default on AIX...

    4. Re:Interesting... by Homestar+Breadmaker · · Score: 1

      No, its in /usr/bin. Any unix OS that #!/usr/bin/perl fails on is broken. Retarded /sw and /opt nonsense is the stupidest thing loonix retards have done in their quest to make the crappiest possible unix-like system.

      And WTF version of AIX are you using? It definately has /usr/bin/env.

    5. Re:Interesting... by HaydnH · · Score: 1

      Are you sure you weren't looking for movies such as "Perl does Phillidelhpia" & "Perl does Paraguay"...

      # mv perl /etc/

      --
      Time is an illusion. Lunchtime doubly so. - Douglas Adams
    6. Re:Interesting... by otis+wildflower · · Score: 1

      3.2.5 of course! On an RS/6000 7015-990..

      Oh wait, that was 1996.. Gotta lay off the nutrasweet...

  53. Neat stuff, but not for me by edmicman · · Score: 1

    I played with gvim a long time ago, and while it seemed nice (plus it seemed quick and lightweight), I just don't want to take the time to learn it. I spent the last 10 minutes trying to figure out how to change the default font, and make it stick next time I open it up. For windows users, the settings just SUCK. Crimson Editor for me, thanks.

    1. Re:Neat stuff, but not for me by Anonymous Coward · · Score: 0

      I spent the last 10 minutes trying to figure out how to change the default font, and make it stick next time I open it up.

      Add :set guifont=font\ name to your _vimrc (search for it in the Vim install folder).

    2. Re:Neat stuff, but not for me by Anonymous Coward · · Score: 0

      :help guifont

      It requires one line in your .vimrc (_vimrc on Windows) configuration file to set the default font. Granted, it'd be nice if you could do this from the gui directly but it isn't exactly an insurmountable problem.

  54. vi compatability by Anonymous Coward · · Score: 0

    The thing that drives me wild with vim is its gratuitous incompatability with vi on repeated undo's.

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

    1. Re:I 3 VIM by lawpoop · · Score: 2, Insightful

      I got fed up with nano's lack of a search-and-replace feature

      Are you talking about ctrl+backslash functionality, or something else?

      ^\ (F14) (M-R) Replace text within the editor

      Though it doesn't say so, you first enter a search string and then a replace string. You then get a confirmation on each instance.

      --
      Computers are useless. They can only give you answers.
      -- Pablo Picasso
    2. Re:I 3 VIM by pjt33 · · Score: 2, Insightful
      I got fed up with nano's lack of a search-and-replace feature
      Which version of nano? I use Debian so I don't even have the most recent version (I'm at 1.2.4), but it does have search-and-replace, including regex support.
    3. Re:I 3 VIM by gentlemen_loser · · Score: 1

      CTRL-C irks the crap out of me as a way to copy text. CTRL-C means "kill process", NOT "copy".

    4. Re:I 3 VIM by tweakt · · Score: 1
      I got fed up with nano's lack of a search-and-replace feature, and didn't feel like learning awk or sed.
      I prefer Vim as well...
      but I thought I'd let you know, nano does has search/replace: Ctrl-W Ctrl-R

      Vim's regular expression matching is obviously far superior.

    5. Re:I 3 VIM by Pixie_From_Hell · · Score: 1
      and didn't feel like learning awk or sed. I finally decided to give vim a serious try.

      Best laugh I've had all day, thanks.

    6. Re:I 3 VIM by n0rm · · Score: 1

      I like eclipse, but sometimes you just need vi... you can configure eclipse to open the current file in VI, do your edit, and return to eclipse.

    7. Re:I 3 VIM by cinnamoninja · · Score: 1

      I finally decided to give vim a serious try. The key was finding _this_ cheat sheet.

      Even better, try this cheat sheet:

              http://www.viemu.com/vi-vim-cheat-sheet.gif

      It overlays different vi[m] commands on an actual keyboard.

      I've printed a copy to pin up right next to my desk, and it's a super informative reference.

    8. Re:I 3 VIM by Anonymous Coward · · Score: 1, Funny

      Ah yes, Cill and Kopy.

      (fucknut)

    9. Re:I 3 VIM by MisterBlue · · Score: 1

      I am a big fan of Eclipse for development but couldn't live without vi for editting (always grabbing for the mouse is a total drag).

      Then I found Michael Barti's vi plugin for Eclipse (http://www.satokar.com/viplugin/). Now I can use most of the basic vi commands for editting while also getting the power of the language plugins in Eclipse.

    10. Re:I 3 VIM by YoungHack · · Score: 2, Informative

      My favorite cheet sheet is the one here:

      http://limestone.truman.edu/~dbindner/mirror/#Vi-R ef

      "The spirit of Vi on one page."

  56. it is what it is by toby · · Score: 2, Informative

    There's always pico, nano, Diakonos, gedit, ... But frankly I love using vi[m] :)

    --
    you had me at #!
  57. vi is what vi is. by itomato · · Score: 1

    Parent should be moderated +3 funny.

    What you want is notepad.exe!

  58. Obligatory by just_another_sean · · Score: 1

    I think there is a definate need for a more userfriendly version of VIM

    "Vim is user friendly, it's just picky about who it's freinds are."

    Seriously, if you want a "user friendly" text editor use gnotepad, gedit, kate or any other GUI editor for Linux. Or nano, pico or ee on the command line.

    Vim is just fine the way it is, especially considering that there are plenty of alternatives if you don't like it's interface.

    --
    Creationist Textbook Stickers Declared Unconstitutional by CowboyNeal
  59. Keymap... by AstroNox · · Score: 1

    I loved VI until I started using Dvorak.

    1. Re:Keymap... by Anonymous Coward · · Score: 0

      God I hate you Dvorak users.
      One and all, slow typing losers.
      And now you're Vi haters as well?
      I hope you all burn forever in hell.

    2. Re:Keymap... by Spaceman40 · · Score: 1

      Really makes the HJKL movement not work too well, huh? I'm a Dvorak-using Vim enthusiast, though - just couldn't make two switches at once, and got used to the shortcuts with the new layout.

      --
      I [may] disapprove of what you say, but I will defend to the death your right to say it.
    3. Re:Keymap... by IpalindromeI · · Score: 1

      This is what I used when I switched to Dvorak:
      http://lists.debian.org/debian-user/2002/07/msg056 54.html

      --

      --
      Promoting critical thinking since 1994.
  60. Who needs the bloat? by kimvette · · Score: 1

    vim is bloated. Why can't they skip the fancy-shmancy keystrokes and other bloat no one needs, and make it more like edlin? hell, edlin will even run in 640K, which ought to be enough for everyone! ;)

    --
    The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
    1. Re:Who needs the bloat? by erikdalen · · Score: 1

      edlin doesn't need 640k of memory. you know with amigaos you could run a graphical multitasking os, filemanager and several programs in 512k including graphics mem. 640k is really enormous for a simple program as edlin.

      and, btw. vim runs in 640k memory as well.

      --
      Erik Dalén
    2. Re:Who needs the bloat? by kimvette · · Score: 1

      Whoosh.

      re-read my post. Did it state or even imply that edlin requires 640K?

      --
      The Christian Right is Neither (Christian nor right). See: Matthew 23, Matthew 25, Ezekiel 16:48-50
    3. Re:Who needs the bloat? by erikdalen · · Score: 1

      Yeah, I know it didn't state that edlin *requires* 640k ram and that your post was ironical. I just wanted to point out that 640k is quite a lot of ram and you could probably run vim pretty well in it, with spell-checking and all.

      --
      Erik Dalén
  61. ocaml syntax highlighting? by Anonymous Coward · · Score: 0

    I just downloaded Vim 7 on my SUSE system and I want to work on my ocaml programs but it doesn't appear to offer ocaml syntax highlighting and autocomplete by default! Is there some way I can enable this functionality, if it exists?

    1. Re:ocaml syntax highlighting? by Homestar+Breadmaker · · Score: 1

      It does appear to offer it just fine. And it has for ages. :cal SetSyn("ocaml")

  62. Nano! by neus · · Score: 1

    I just use nano ! Its waaay smaller ... like a milliardth! ( get it ? ) Someone should create Yocto ...

  63. Vim by Qbertino · · Score: 1

    stands for 'Visual Editor, Improved'. No shit.

    --
    We suffer more in our imagination than in reality. - Seneca
  64. ctrl doesn't bother me by p3d0 · · Score: 1

    I actually hit the ctrl key with the "heel" of my left pinky -- that joint where the pinky joins the palm.

    --
    Patrick Doyle
    I mod down every jackass who puts his moderation policy in his sig. Oh, wait a sec....
  65. Steep learning curve...? by mogrify · · Score: 2, Funny

    I tried to figure out exactly how steep vi's learning curve is, and I got a DivideByZeroException... :(

    --
    perl -e 'foreach(values %SIG){$_="IGNORE";}while(){}'
    1. Re:Steep learning curve...? by Ymerej · · Score: 2, Informative

      The standard Cognitive Psychology term "learning curve" refers to a graph of the amount learned as a function of time. See the "learning curve" question in this quiz. So a graph of your skill with vim as a function of time would be rather shallow. But "steep" sounds harder, like climbing a steep hill. I know, I know, resistance is futile, and usage trumps the original offical definition. OK, I think I can go a couple of years now without saying this.

    2. Re:Steep learning curve...? by mogrify · · Score: 1

      Don't bother me with these troublesome "facts" about how "psychologists" would plot this graph. If what you say were true, my joke wouldn't work at all... or at least, it'd be about Ruby on Rails instead of vi ;)

      --
      perl -e 'foreach(values %SIG){$_="IGNORE";}while(){}'
  66. Pico/Nano by g8oz · · Score: 1

    You know I never figured out why Pico and its open source cousin nano weren't more popular. Maybe they are to easy to use.

    1. Re:Pico/Nano by AnonymousKev · · Score: 1

      Why? Just think, man! pico is four letters; vi is only two. That's a 50% decrease in productivity just starting up the editor. Now, if it had been named pi (or even p) this article could have been about the 7.0 release of pim. :)

      --
      Anonymous Kev
      Proudly posting as AC since 1997
      (Finally got a dang account in 2004)
    2. Re:Pico/Nano by kievit · · Score: 1

      Actually they are quite popular, I think; namely as the message editor in the "Pine" e-mail client. In my work (particle physics) lots of people use Pine (with the default editor). Though the students tend to deviate to the mozilla/firefox e-mail client. Even I use Pine with pico for casual e-mail; for every other text editing job I use vi, of course.

    3. Re:Pico/Nano by bensch128 · · Score: 1

      Definitely too easy to use.
      My coworkers have been forced to learn vi because its the only editor builtin with busybox. I finally got so pissed off that I just dl'ed nano and installed it instead. Maybe I'll symlink vi -> nano, hehehe

      Cheers,
      Ben

  67. "Drug after effects" :-) by Werrismys · · Score: 1
    The sig is appropriate :-)

    I grew with 'jed' in emacs mode, since it was much faster on 486, but nowadays more and more often just launch vi/vim. 0 seconds vs 2 seconds is still a big difference for those one line edits.

    --
    'Once scientists, even the dim-witted social scientists, get muzzled, the Western Civilization is finished.' - oldhack
  68. Intelligent completion by Orlando · · Score: 1

    What a useful feature this will be, a lot of people have told me my intelligence has been lacking.

    --
    -= This is a self-referential sig =-
  69. Yeah, but does it code fold?? by mytec · · Score: 1

    :-)

    1. Re:Yeah, but does it code fold?? by Anonymous Coward · · Score: 0

      Yes....

    2. Re:Yeah, but does it code fold?? by mytec · · Score: 1

      I was just trying to start something. I've seen heated discussions on the merits (or lack of) of code folding. It does look a bit tedious to do in Vim.

    3. Re:Yeah, but does it code fold?? by jdgeorge · · Score: 1

      I was really excited about that feature when it appeared, so I tried to fold code while using vim, but my monitor spit out sparks and shards of glass while I was bending it in half.

      Since then I have studiously avoided attempting to fold code with any editor, and bought a larger monitor instead.

  70. Congratulations! by aCapitalist · · Score: 1

    Wow, just a few minutes ago I was wondering when Vim 7 was going to be released because I wanted to make some improvements to a Haskell plugin that seems a bit dated.

    Great work Bram and the crew, and congratulations on getting hired at the big G.

  71. I HATE VI. Convince me otherwise. by Qbertino · · Score: 1

    I use jEdit. Only downside with that is that it's a slowpoke compared to Vi or Emacs. No news here. Question: Besides requireing to turn your brain off when learning to operate it, does Vim do all the stuff jEdit can do? Line Numbering, Folding, Bracket Scope Highlighting ... What's with search and replace across directories, etc.
    Or is it that one is expected to use other CLI tools for that?

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:I HATE VI. Convince me otherwise. by Anonymous Coward · · Score: 0

      jEdit doesn't exist by default on most Unix systems whereas VI exists on all. VI is also the standard in the command line world with emacs a close second. If you get on a machine you've never used before and need to do admin work, your best bet is vi.

    2. 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!
    3. Re:I HATE VI. Convince me otherwise. by Anonymous Coward · · Score: 0

      where is the vim replacement for ESS (Emacs Speaks Statistics)? If there is something that would do that, I'd have no problem switching...anyone?

    4. Re:I HATE VI. Convince me otherwise. by sharekk · · Score: 1

      Vim can do everything Emacs can do

      Bah. As much as I prefer vim, I have yet to see it play tetris.

    5. Re:I HATE VI. Convince me otherwise. by the_greywolf · · Score: 1
      Bah. As much as I prefer vim, I have yet to see it play tetris.

      http://www.vim.org/scripts/script.php?script_id=17 2

      --
      grey wolf
      LET FORTRAN DIE!
  72. No need to power-cycle by pjt33 · · Score: 1

    Even the first time I tried using vi I didn't have to resort to the power button. Ctrl-Z, ps, kill.

  73. No praise for Bill Joy? by hogger · · Score: 2, Informative

    This thread isn't complete without mention of Bill Joy, the creator of vi. He's the one that should be thanked for most of the things that everyone has mentioned that they love about vim.

    http://www.theregister.co.uk/2003/09/11/bill_joys_ greatest_gift/

  74. For those that like the best of both worlds by aCapitalist · · Score: 1

    There's viemu for VS2005/VS2003 and viPlugin for Eclipse.

    Also, if you're learning Vim and start liking it I would recommend keytweak on windows and xmodemap on Unix for swapping Caps Lock and Esc.

    1. Re:For those that like the best of both worlds by vga_init · · Score: 1

      Also, emacs has viper-mode. This is ideal for people like me who have vi keystrokes so deeply ingrained that they can't stop using them ever but would like to have access to some of emacs' functions. Enjoy!

    2. Re:For those that like the best of both worlds by Anonymous Coward · · Score: 0

      I've heard people talking for quite some time about seperating out much of the functionaliy in Vim into a library, and then creating various user interfaces for console, gtk, etc. This would allow usage of Vim in KDE, VS, Eclipse, as well as a nicer Gtk+ version. I thought that this was actually on the development roadmap and at one time was scheduled for the version 7 release. Now there doesn't seem to be any mention of it. Anyone know what happened?

    3. Re:For those that like the best of both worlds by aCapitalist · · Score: 1

      That idea has been thrown around for quite a while, and I'm sure Bram would have liked to have done it, but the Vim codebase has become a tangled mess of #ifdef OBSCURE_PLATFORM because of said obscure platform's broken compilers and/or standard c libraries.

      But I think it has been somewhat done with a project called Yziz (or something to that effect). I believe it has been made into a Kpart and is somewhat usable in Kdevelop.

  75. No Mac version.... by katorga · · Score: 0

    Come on guys....keep the OS X version up to date.

  76. Re:Real Programmers use Notepad... by Craig+Davison · · Score: 1

    I'd probably use Notepad if it would tell me what line the cursor is on.

  77. vim sucks by the0ther · · Score: 0

    mod me as a troll. just expressing my opinion. who cares about vim? get your head outta the 70s you old men.

    1. Re:vim sucks by Anonymous Coward · · Score: 0

      I don't necessarily think you should be modded "Troll" just because you are ignorant.

    2. Re:vim sucks by c0WG0d · · Score: 1

      i'm 27 years old and i love vim. it's not just for old hippies.

      --
      cowgod Esc:wq
  78. I hate it when by SlashSquatch · · Score: 1, Funny

    a I get into a regular editor and starttypxxxx start typing esc x a all over the place:x

    --
    Autonomous Retard -- Is your camp safe? UnsafeCamp.com
  79. First vi encounter by Arandir · · Score: 2, Interesting

    My first vi encounter was back in the days of the dinosaur. It was the later cretaceous, to be exact. At the time people used a wide variety of terminals to connect to the computer. The terminals themselves tended to be system specific, so that some had function keys, other didn't; some had arrow keys, others didn't; and some had meta keys, while others didn't. Using such a variety of terminals for Unix was a major problem, ranking up there with the problem of using a huge variety of printers. But then came vi and it didn't need function keys, arrow keys or meta keys. I could finally have a full screen text editor on ANY terminal I chose. With a tiny handful of commands I could be productive. In comparison to the other editors, it was easy to use. At the time vi was a huge step forward.

    Modern interfaces with mice and menus and toolbars may have made vi somewhat obsolete, but I would still rather write software using vi than with <hack> MSWord...

    p.s. The problem with emacs was that it requried two meta keys, which weren't always available, and even if they were, may be in different keyboard locations under different names. It also required chording which slows down typing (especially if you weren't sure where the meta keys were on this keyboard). And as other people have pointed at, at the time you were guaranteed that vi would be available on any Unix system, while access to emacs was hit or miss.

    --
    A Government Is a Body of People, Usually Notably Ungoverned
  80. Clippy for vim by Anonymous Coward · · Score: 0

    Yes!! If you've ever wanted an assistant for your favourite editor, check this out!

  81. VI is decent, but here's a suggestion... by cwalk · · Score: 0

    To all of you stubborn elitists: GUI editors like UltraEdit provide the same functionality without the ridiculously steep learning curve. GUIs + Keyboard Shortcuts are your friend, and I find that most hardcore VI users are to damn proud to admit that.

    1. Re:VI is decent, but here's a suggestion... by omega9 · · Score: 1, Interesting
      If we accept that:
      • Most thoughtful admins don't run X on their servers, and..
      • Those same admins would still like a powerful text editor on those servers

      then i submit..
      • Why should we be punished just because we're not running a GUI?
      • We're not stubborn elitists. You're a pussy that can't learn anything more complicated then UltraEdit

      Also..

      "GUIs + Keyboard Shortcuts are your friend"

      The ammount of keyboard shortcuts in VI will eat your fucking GUI editor for lunch.
      --
      I'm against picketing, but I don't know how to show it.
  82. Emacs and Vim are both old-school by oldCoder · · Score: 1
    And they are quite ugly and hard to use. The tags systems are antediluvian. See Source Insight or Visual Slickedit for a much better approach (although they are both proprietary). They both illustrate a lot of the weaknesses of FOSS (not that there aren't strengths too).

    But you can use either vim or emacs on a linux server you're getting to via SSH and you can do fix ups. The only alternative is 'ed'.

    I was recently astonished to discover that vim is ahead of emacs in editing right-to-left text. That is, Arabic and Hebrew (and probably Farsi). I had switched from the old vi to emacs in the 1980's and hadn't been following vim development. The idea that vim was ahead of emacs in anything was a shock. But it is.

    --

    I18N == Intergalacticization
    1. Re:Emacs and Vim are both old-school by colinrichardday · · Score: 1

      Ugly? I must disagree. GNU Emacs on Gnome (the Gnome from SUSE 9.2) has a beautiful dark blue background with light fonts.

      Also, do Source Insight or Visual Slickedit have TeX/LaTeX syntax support?

    2. Re:Emacs and Vim are both old-school by oldCoder · · Score: 1

      I don't think they have latex/tex and source insight only runs on windows. Slickedit has a binary they sell apparently for x86 linux, though. It's $300 plus $60/year thereafter. Not free.

      --

      I18N == Intergalacticization
    3. Re:Emacs and Vim are both old-school by doon · · Score: 1
      if using X...

      You can change emacs's colors via your .Xdefaults file

      for example

       
      Emacs.background: ivory
      Emacs.foreground: MidnightBlue
       
      Emacs.modeline*attributeForeground : MidnightBlue
      Emacs.modeline*attributeBackground: Bisque
      --
      To E-mail me, replace the first period in my domain with an @
  83. Laptop keyboard by TeXMaster · · Score: 1

    I'm a newcomer to mode editing. I first got interested in it when I bought my laptop: on most laptop keyboards, the nonalphanumeric keys are absolutely clumsy and wrist-stressful to reach. This is what really got me into using Vim. A posteriori I realize that the benefit in terms of relax on the hands and in speed is enormous. The only problem are the spurious hjklxxxxiaddgg coming up when using other programs :)

    --
    "I'm never quite so stupid as when I'm being smart" (Linus van Pelt)
  84. vim 8 will be emacs by sentientbrendan · · Score: 1

    spell checker? email?
    Bah, vim 8 will be rewritten in a functional scripting language that only cs majors have ever heard of, will have a built in usenet client, and the ability to display inline images. It will also feature inline evaluation of its scripting language, be completely confirguarable, but only by writing scripts in that language, and pretty much any kind of extension whatsoever through modules written in that language. It will feature every feature in every application ever. It will be a combination, IDE, movie player, web browswer, word processor.

    Vim 8 will be the bastard child of emacs, MPW, and cyberdog. All the advantages of an entire operating system, with all of the advantages of running everything in the same process and address space.

  85. Isn't Vi part of POSIX and Unix Specification? by HighOrbit · · Score: 2, Interesting

    IIRC, the presence of vi and ex are part of required compliance for POSIX and the Single UNIX Specification. So, it is not just there by convention or convenience, but is a requirement for guaranteed inter-operaability, along with ed, sed, and awk. Or does POSIX simply define the behavior of those tools and not require their presence?

  86. Notepad++ by netrage_is_bad · · Score: 2, Interesting

    Ever since I found notepad++ http://notepad-plus.sourceforge.net/, I have never looked at another editor.

  87. loved it from the start by AlienBrain · · Score: 1

    My favorite shell in the late 80's was JADU (Just Another Disk/Directory Utility) which had similar keyboard driven command interface. Not quite as varied as vi, but I loved it. "d" for delete, "m" for move, "c" for copy. You could use the mouse, but things are so much faster with your fingers on the keyboard.

    Nowadays I love vi, and often am reminded of JADU from way back.
    J

  88. VI: The Hummer H2 of text editors /nt by Anonymous Coward · · Score: 0

    It's all in the subject, dammit. Stupid filter...

  89. You are right. TECO rulez. by expro · · Score: 1

    Who needs anything besides TECO.

  90. groups.yahoo.com ... slashdotted?! by Anonymous Coward · · Score: 0
    From the cited http://groups.yahoo.com/group/vimannounce/message/ 161 (as of 4:14 EST on May 8):
    The message you requested is temporarily unavailable because this group has exceeded its download limit. Please try again later.
    So then what's the point of hosting it on yahoo if they won't handle the increased load that inspired Bram to host it offsite in the first place?

    Catch the cached copy from mirrordot at http://mirrordot.org/stories/2c9980c06779ce9edee1a 875498fc2f7/index.html ... here's the highlighted changelog:

    Since Vim 6.4 many new features have been added. To mention a few:

    - Spell checking support for about 50 languages
    - Intelligent completion for C, HTML, Ruby, Python, PHP, etc.
    - Tab pages, each containing multiple windows
    - Undo branches: never accidentally lose text again
    - Vim script supports Lists and Dictionaries (similar to Python)
    - Vim script profiling
    - Improved Unicode support
    - Highlighting of cursor line, cursor column and matching braces
    - Translated manual pages support.
    - Internal grep; works on all platforms, searches compressed files
    - Browsing remote directories, zip and tar archives
    - Printing multi-byte text
  91. you deserve a flaming by Ender+Ryan · · Score: 1
    Seriously, you _deserve_ a flaming. I'm not saying that as an elitist asshat, I'm saying that as a lazy-summabich just like you. Except, I didn't wait 11 years to get my head out of my ass and do myself a favour. I started using Unix in 97, and finally decided to learn vi(m) around 2002. It didn't take long before it was far easier to use than any other editor I've ever used. I'm so lazy, in fact, that after 4 years, I still don't know how to use a lot of the more basic features. However, even with a very, very basic knowledge of vim, and :help, vim is the easiest editor to use on a regular basis.

    Do yourself a favour, get over the learning curve. You'll be glad you did.

    --
    Sticking feathers up your butt does not make you a chicken - Tyler Durden
  92. and laptops by massysett · · Score: 1
    There are many characters like ctrl, alt, home, and such that don't travel well over telnet.

    And on laptops. My laptop sticks these buttons in strange locations that I can't hit by touch. It also shrinks the buttons. With Vim the only non-alphanumeric button I need to hit is escape. I never thought a computer as technologically advanced as a laptop would benefit from an editor with roots as old as Vim, but it does.

    1. Re:and laptops by trewornan · · Score: 1

      The one thing I always hated about vi/vim was the constant need to reach for the escape key. Until someone on in a previous /. discussion was kind enough to point out CTRL-[ as an alternative - I haven't looked back since.

    2. Re:and laptops by Stepping+Razor · · Score: 1

      i touch type and i find the use of the escape key in vim is awkward. i was just thinking about this fact when i stumbled across your post.

      thanks for passing that information on.

  93. How to "Get" vim... by reed · · Score: 1

    Everyone who says about VIM that "it's hard to learn" don't really get VIM.

    It's not supposed to be easy to learn. That's just not a consideration when it comes to VIM. In fact, the only consideration of VIM is to provide good tools for editing a file of source code.

    That's pretty much it.

    And it does that one job very well and efficiently.

    (Of course, I don't really see how spellcheck has anythnig to do with editing source code, but I guess it was easy enough to bring in a spellchecker. Does it have its own dictionaries or does it use e.g. ispell's dictionary?)

  94. 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.
    1. Re:My knowledge of vim... by Moridineas · · Score: 1

      A couple other things that I find useful

      $ -- moves cursor the end of the line

      ^ -- moves cursor to the start of the line

      dt X -- deletes up until (not including) character 'X'
      df X -- deletes up to (including) character 'x'
      d/ str -- deletes up until regex string

      dw -- delete word

    2. Re:My knowledge of vim... by Anonymous Coward · · Score: 0

      Here's a few more I use.

      * -- Search forward for word under cursor
      # -- Search backward for word under cursor

      A -- append to end of line

      o -- write to new line below cursor
      O -- write to new line above cursor

      and sometimes a macro using
      1) q
      2) a
      3) ..enter macro..
      4) q
      5) @a to run it

    3. Re:My knowledge of vim... by HaydnH · · Score: 1

      Don't forget that you can do commands multiple times aswell, 5ia[esc] will insert 5 letter a's, 10dd will delete 10 lines, 21 [down arrow] will move down 21 lines etc etc.

      --
      Time is an illusion. Lunchtime doubly so. - Douglas Adams
    4. Re:My knowledge of vim... by pimpimpim · · Score: 1

      I use more or less the same subset, and of course the regexps, but that's about it. Probably this way one misses out on a lot and a lot of vim features that could really speed editing up, but it'd take some effort and time to learn it and remember it, and in the end it just never comes to this :)

      --
      molmod.com - computing tips from a molecular modeling
    5. Re:My knowledge of vim... by Anonymous Coward · · Score: 0

      Wow, impressive. The only vi key sequences I can ever remember are: ^Z $ killall -9 vi

  95. Vim Crash Course :wq by Baricom · · Score: 2, Informative

    In addition to the above (all excellent, and probably recommended, resources), here's an absolute beginner's crash course to getting around in vim. (RTFM for much, much more.)

    Once you launch vim, you're in command mode. You do stuff in command mode.
    When you need to type something, you need to switch to insert mode. Type i in command mode for that.

    Type all of these in command mode to use them. To move from insert mode to command mode, press ESC.

    j - move down
    k - move up
    h - move left
    l - move right
    i - insert mode :w - save file :q - quit :wq - save file and quit :q! - quit without saving :help - self-explanitory

    If this was all vim was, nobody would use it. The power comes in the ability to do complicated text manipulations with just a few keypresses. For example, you can do many commands more than once by prefixing them with a number. Typing 25l is equivalent to pressing the right arrow key 25 times in a typical text editor. You just saved 22 button presses.

    I would personally recommend vimtutor, as another poster suggested. Just type that at a shell and vim will start with a text file that explains how it works. That's how I learned the basics. It took about 10 hours over the span of five days to go from absolutely no knowledge to being comfortable using vim regularly.

    Good luck.

    1. Re:Vim Crash Course :wq by brewt · · Score: 1

      I love vim, but vim in vi compatibility mode is horrible (only because I'm used to nocompatible mode)! Remember to "set nocompatible" in your .vimrc to make vim a little more user friendly.

    2. Re:Vim Crash Course :wq by dlbornke · · Score: 2, Informative

      Yep ... or s.th. like that:

      "Delete all lines which do not begin with the work 'ERROR'" (for log files):
      :g!/^ERROR/d

      "Comment out all lines that contain the word 'debug'":
      :g/debug/normal I//

      "Indent the whole file":

      gg=G

      "Sort the file and delete double entries":
      :%!sort|uniq

      etc., etc. ... and once you know how to use the help, it's really easy to find this über-stuff

    3. Re:Vim Crash Course :wq by sglider · · Score: 1

      Thank you, btw. My problem is that I'm coming from a windows environment. Though I have been looking to put linux on my laptop, I haven't made the jump on my desktop yet due to the fact that FPS gaming is still a Windows Function.

      Unfortunately.

      --
      War isn't about who's right. It's about who's left.
  96. 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?

  97. Re:Real Programmers use Notepad... by 1g$man · · Score: 1

    Well, I guess you'll be using notepad from now on.

    (View | Status Bar)... on XP, anyway.

  98. Vi IMproved? by znx · · Score: 1

    vim version
    :/vim6/s/6/7
    :$s/Old Stuff/New and Improved Stuff/
    :1s/\(Review:\).*/\1 I LOVE IT/
    :wq

    --
    BOO
  99. gosh, so you say emacs is better than vi? by aurelian · · Score: 1

    You ought to raise that issue more widely - maybe post it on USENET. A lot of vi users might not have considered that before. Your explanation of why emacs is great and vi sucks is really clear, and should certainly settle the matter.

  100. map by SeanAhern · · Score: 1

    Please explain how you manage to type ":" without pressing two buttons at once.

    map ; :

    The best .vimrc line ever.

    1. Re:map by mypalmike · · Score: 1

      Does that affect regular editing? Most programming languages I use have semicolon delimiters.

      --
      There are 0x40000000 types of people: those who understand 32-bit IEEE 754 floating point, and those who don't.
    2. Re:map by SeanAhern · · Score: 1

      Nope, doesn't affect it at all. I've programmed in C, C++, perl, and shell with that mapping for years.

      Try it and see.

  101. Alternative link for announcement by kristgy · · Score: 1

    The link to the Yahoo mailinglist archive is dead. An alternative archive is here.

  102. Neat vim trick by SeanAhern · · Score: 1
    I've said this in a number of other comments, but I'll highlight it here. Here is the best line that I've ever put in my ~/.vimrc file:
    map ; :
    That globally maps the semicolon key to do what the colon key normally does. I lose the "search for last character within the current line" feature that semicolon used to do, but I've never missed it.

    With this, doing :w becomes the same as typing ;w.
  103. map by SeanAhern · · Score: 1

    Please do tell me how you get the ":" without hitting two keys at the same time.

    map ; :

    The best line I have in my .vimrc.

  104. wanted: auto variable complete and intellisense by t35t0r · · Score: 1

    I want auto variable complete in c mode, perl mode, c++ mode, ruby mode, python mode, and any other programming language mode (similar to word complete in openoffice). Visual Studio 2005 has this for c, c++, and it's .net languages. Oh and a intellisense type thingy wouldn't hurt either.

    1. Re:wanted: auto variable complete and intellisense by moro_666 · · Score: 1

      ever tried to press control+n in vim ?

      --

      I'd tell you the chances of this story being a dupe, but you wouldn't like it.
  105. Feature complete? by colinrichardday · · Score: 1

    Nah, GNU emacs will be feature complete when it has a mode for editing levels of Duke Nukem Forever.

  106. Handcuffs by Anonymous Coward · · Score: 0

    Because you can't use the mouse and type the keyboard at the same time, when you have handcuffs.

  107. enable spellcheck safely by Khopesh · · Score: 1
    in your .vimrc, check for version 7 before enabling spellcheck:
    " if in vim 7.0, activate spellcheck in American English
    if version >= 700
    setlocal spell spelllang=en_us
    endif
    See also :help :spell
    --
    Use my userscript to add story images to Slashdot. There's no going back.
    1. Re:enable spellcheck safely by Khopesh · · Score: 1
      ooh, hit submit too early. now that i'm done tweaking my .vimrc:
      " vim 7.0+ features
      if version >= 700
      " activate spellcheck, toggle with F6, starts ON
      setlocal spell spelllang=en_us
      noremap <silent> <F6> :set spell!<CR>
      inoremap <silent> <F6> <c-o>:set spell!<CR>

      " turn on omni-completion when available
      au Filetype * if exists('&omnifunc') && &omnifunc == "" |
      \ set ofu=syntaxcomplete#Complete |
      \ endif
      endif
      (most of this is taken from http://pierreantoine.lacaze.free.fr/linux/config/f iles/vimrc.html)
      --
      Use my userscript to add story images to Slashdot. There's no going back.
  108. Vim made sweeter? by Clansman · · Score: 1

    I think that this might be the Cream you are searching for...

  109. ODF Plugin available? by Anonymous Coward · · Score: 0

    If not this is useless as ODF is taking over! ;)

  110. Macro handling by Trogre · · Score: 1

    I hope this version has better macro handling.

    If anyone knows of a way to record AND EDIT macros I'd dearly love to know about it.

    The regular 'qv' '@v' method of recording and playing back results in something like this in .vininfo:
    "v CHAR 0
    ~@>i^M# Site variation^M^[yypi~@ku# ~@kd~@>^[

    The ^M and ~@ characters above are control-characters that can't be just copied and pasted btw.

    You can do (more or less) the same thing by putting the following in /etc/vim/vimrc:

    map ,v <HOME>i<CR># Site variation<CR><ESC>yyp<UP>i# <DOWN><DOWN><HOME><CR><UP><UP><ESC>

    but then of course you lose the benefits of the record feature in the first place.

    So how does one translate one to the other without a whole heap of sed?

    --
    "Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
    1. Re:Macro handling by univgeek · · Score: 1

      You need to realize that the 'v' is actually the BUFFER 'v', you know the one you can copy into by saying "vyW . This is of course very very useful to edit the macro when you've done something wrong. Simply do a "vp to paste the macro into the text area, then modify as necessary (you'll have to be careful of the control characters, then do "vy$ or similar to copy it back in. @v and boom you're in!

      BTW, when you are recording a macro, I would strongly suggest you use hjkl for movement, and $, 0 etc., as opposed to the arrow keys. That will get rid of most of the control characters. hjkl takes some getting used to, but 5j, 5k, are worth the learning effort.

      You can actually save the macro this way :-). I'm going to get abused for this, but I saved a macro that was going to be of use to the next guy who had to edit the code and instructions on how to use it. So all he has to do is edit some text which is PART of the macro, copy the macro into the buffer and execute it :-).

      Enjoy!

      --
      All bow to his Noodliness!! His Noodle Appendage has touched me!
  111. Yes, but . . . by Anonymous Coward · · Score: 0

    That's very nice and all, but does it include an operating system yet?

  112. http://mozex.mozdev.org/ by roscivs · · Score: 1
    When can I get vim embedded into text fields in Firefox?

    http://mozex.mozdev.org/
    --
    ~ roscivs
  113. So why didn't the name change? by NotQuiteReal · · Score: 1

    Now that it is version 7 shouldn't it be vii?

    --
    This issue is a bit more complicated than you think.
  114. Comparing with Eclipse by zerosignal · · Score: 2, Insightful

    I've never used vim or emacs, but would like to learn. However, I'm concerned that I'd be losing out on a lot of Eclipse's functionality when it comes to writing Java, e.g. refactoring, object-sensitive method name autocompletion, etc. Would vim or emacs really be better?

    1. Re:Comparing with Eclipse by doti · · Score: 1

      Try http://eclim.sourceforge.net/

      From their homepage:

      The primary goal of eclim is to bring eclipse functionality to the vim editor.

      Eclim is less of an application and more of an integration of two great projects. The first, vim, is arguably one of the best text editors in existence. The second, eclipse, provides many great tools for development, especially java development.

      Each provides many features that can increase developer productivity, but both are lacking overall. Vim lacks native Java support, and eclipse still requires the use of the mouse for many things, and when compared to vim, provides a less than ideal interface for editing text.

      That is where eclim comes into play. Instead of trying to write a java ide in vim or a vim editor in eclipse, eclim provides an eclipse plug-in that exposes eclipse features through a server interface, and a set of vim plug-ins that communicate with eclipse over that interface.

      --
      factor 966971: 966971
    2. Re:Comparing with Eclipse by figa · · Score: 1
      You're going to miss out on a lot if you got with vim for Java editing. I love vim, and I've used it since near its inception. I've been using vi since 1987, and I still use vim every day for writing email. My vimrc is 544 lines long, and it's nearly all custom functions I wrote for Java back before Eclipse was available. What got me to switch to Eclipse was refactoring. My coworker, a lifelong Emacs poweruser switched shortly after I did for the same reason.

      Refactoring in Eclipse made a huge difference in how I program. I no longer fret over variable, method, and class naming, since it's trivial to rename anything across an entire project. When I used vim, I knew that if I named something improperly, there was a good chance I'd spend half an hour fixing it later on. Using perl or sed for this sort of thing can lead to nasty bugs, and with Eclipse, I'm confident I'm getting it right, instantly, and that I can undo refactorings instantly. I'm also less afraid to write massive blocks of code, since I can extract methods instantly once I have the code down on the page. Same goes for inlining if I become overzealous in my method extraction.

      I also use the quick fixes constantly. It takes seconds to introduce a new parameter to a constructor and pass it into a field with a quickfix. It takes a keystroke to make a constant value into a constant field or take a local variable and make it a field. There are other great coding features of Eclipse (error flagging, navigation, completion, junit integration) which you could get in vim using Eclim, but remember, these are included out of the box with Eclipse, and you're going to have to fight to get them working in vim.

      I felt that working with Eclipse made Java programming an order of magnitude more fluid and more fun. It removed most of the gruntwork, and as a bonus it has a handy debugger, a helpful CVS UI, and drop in integration for profilers, Spring development, and code coverage tools.

      By all means, learn vim or emacs for remote editing and shell scripting, but Eclipse (or Idea, if you want to pay for it) will make you substantially more productive, and you'll have more fun coding.

  115. Yeah, VIM works over MS Telnet. by WoTG · · Score: 1

    Yeah, I haven't used VIM much; however, a while back I needed an easy way to edit config files on some WinXP Pro computers that I manage remotely. VIM was the first text editor that I could find that would work over the Microsoft Telnet Service (via VPN). I still don't know the interface that well, but there are a million or so cheatsheets on the web to get the basics going.

  116. Cream by pajama · · Score: 2, Informative

    If you like Vi try Cream:

    Cream

  117. emacs is the best by Anonymous Coward · · Score: 0
  118. Which editor was used to code the first editor? by Anonymous Coward · · Score: 0

    Masochists use "dd of=/dev/hda skip=3845895 bs=1" for fine-grained and powerful editing.
    Sados use "echo >>myfile".
    Purists use "cat myfile".
    Bulgarian vx'ers who could never afford msdos6.22 upgrade use "debug.com".
    Bulgarian who could upgrade to windows use "notepad.exe".
    Bill Gates uses "edit.com", to patch infinite lives in nibbles.bas.
    Scientifics use "ed".
    Nostalgic use "joe".
    Shy people use "vim".
    Autists use "vi".
    Retired people use "emacs".
    Russian use "le".
    Lazy people use "less".
    Trollers use "firefox".

    --

  119. Mouse and shortcuts by Sithgunner · · Score: 1

    After using vim for 2 years and such, usually only for editing configuration files but not much coding, I still never really like it the way it is.

    There are just way too many shortcuts you need to remember to make it of any use, if you don't, then vim just looks like a just plain painful editor. And ever since I have been editing various source codes on Windows with mouse and keyboard with about only 10 shortcuts to remember to get the full out of a text editor, I can never really appreciate whatever is good about vim. Sure you may not have to move your hand from the same position, but going back and forth the insert mode and command mode with mind keep boggling to think what I had to press to just delete a few part of a line, it's just never ever been any productive to me in the years...

    And in the end, I feel like vim are for people who don't really use mouse as an external input for editing source codes. And I never feel using mouse on a text editor is slowing me down or clumsy.

    Is it the generation of people who has been the keyboard guy in the past and recent new comers are all starting to appreciate the use of mouse over 50 keyboard shortcut you have to remember to move the cursor?

  120. There's a connection Vi - Wii by dbIII · · Score: 1

    Now I understand the name for Nintendo's new console going for geek appeal - they're saying it's twice as good as Vi!

  121. better regexes ? not likely by layingMantis · · Score: 1

    exactly how do you figure vim has better regular expressions that P-E-R-L ???

    I call bullshit, but feel free to post some evidence of this.

    1. Re:better regexes ? not likely by kuzelnik · · Score: 1

      negative lookbehind of non arbitrary length.

      see
      http://www.perl.com/doc/manual/html/pod/perlre.htm l
      -- quote --
      (?!pattern)

              A zero-width negative lookbehind assertion. For example /(?!bar)foo/ matches any occurrence of ``foo'' that isn't following ``bar''. Works only for fixed-width lookbehind.
      -- end quote --

      quote from file pattern.txt from Vim builtin documentation
      -- quote --
      \@! Matches with zero width if the preceding atom does NOT match just
              before what follows. Thus this matches if there is no position in the
              current or previous line where the atom matches such that it ends just
              before what follows. |/zero-width| {not in Vi}
              Like '(?!pattern)" in Perl, but Vim allows non-fixed-width patterns.
              The match with the preceding atom is made to end just before the match
              with what follows, thus an atom that ends in ".*" will work.
              Warning: This can be slow (because many positions need to be checked
              for a match).
              Example matches ~
              \(foo\)\@!bar any "bar" that's not in "foobar"
              \(\/\/.*\)\@\!in "in" which is not after "//"
      -- end quote --

      This is just ONE example.

  122. aside from bash... by gregorlowski · · Score: 2, Interesting

    vim is the program that I use most. I used to code mostly shell stuff as a sysadmin and RAD niche programs: bash, perl, python, ruby... I always use vim for that. I also use vim for html, css, javascript, latex, and plain-ol' writing any kind of text.

    These days I've been using eclipse a lot in emacs mode because my current job requires lots of java coding of a program with a huge code base, and my wrists are starting to hurt. Seriously, emacs is also good (IMHO not as fast as vim if you know both really well -- I use emacs mode in bash and know it pretty durn well too), but the weird stretches that you do in emacs will give you serious hand and wrist problems from awkward repetitive hand movements.

    The other reason I prefer vim is that I REALLY LIKE having an editing mode separate from an insert mode. I like using vim to navigate through my code without worrying that I'll accidentally delete a character or make a typo. I actually do that all the time when I use emacs mode in eclipse, and then I have to undo my changes (but sometimes it takes a second to figure out which was the last intentional change).

    With vim I can navigate through my file with little worry that I'll mess anything up.

    And vim is FAR superior to old vi!!! Syntax-highlighting, word completion (C-n, C-p, dictionary completion, file completion...)

    Emacs may be somewhat more powerful/extensible, and I believe it's quite good for coding in C/C++ and integrating with build tools -- a wonderful editor and environment. But for shear editing speed I think NOTHING can beat vim.

    1. Re:aside from bash... by doti · · Score: 2, Informative

      Have you tried the vi mode on bash (set -o vi)?
      Now I can live without it.

      Oh, and remap your caps-lock key to behave as escape too, it's much more comfortable.

      In X:
              xmodmap -e 'remove Lock = Caps_Lock' -e 'keysym Caps_Lock = Escape'

      On the console:

              echo 'keycode 58 = Escape' | loadkeys -

      On Windows:

      REGEDIT4

      [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Contr ol\Keyboard Layout]
      "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00 ,3a,00,00,00,00,00

      --
      factor 966971: 966971
  123. Vimail by jabbo · · Score: 1

    well, that would be Mutt. MUA of the gods.

    I just realized that I can bind attaching to a screen session running Mutt to a key in Vim. This has great (recursive) potential for rending the fabric of the universe (or at least blowing up the stack in my shell). Why didn't I think of that earlier?

    --
    Remember that what's inside of you doesn't matter because nobody can see it.
  124. But by srcosmo · · Score: 1

    Where are the screenshots??

    --
    free speach
    Did you mean: free speech
  125. Editing Contest Needed by philci52 · · Score: 1
    It always seems that someone is saying that their editor is the best (I'd have to side on vim with this one). I think its time for for people to pick up their keyboards and do battle in an editing contest. Of course the big question is how this editing contest should work.

    1. There should be a small set of power users representing each editor.
    2. Certain editors are better at some things, so there must be several differnt tasks that need to be accomplished, for example - write a file from scratch, change these comments (something very few code editors do well), create these data sets from this log file, replace all instances of X across all files that use it, rename class Y..., create a numbered list of Z, edit this Unicode file, you get the idea.
    3. Contestants should be able to operate in the enviorment of their choice (OS, editor configuration...)
    4. All keystrokes/commands must be logged
    5. Final product must be buildable and runnable
    6. Contestants may open multiple instances of their editor
    7. Contestants must use ONLY their editor to complete tasks, If you editor allows you to execute shell commands, then they are allowed, but only if run from within the editor.
    8. Best editor is judged by the total time to complete all tasks, then averaged across the number of representatives for that editor


    Finally we can determine what the best text editor is and all the other people can wait till the next year and new releases to do battle!!.
  126. Re:Real Programmers use Notepad... by berzerko · · Score: 1

    If you press ctrl-g or use the corresponding menu option to jump to a line the popup will display the current line at which the cursor is located. Make sure word wrap is turned *off* otherwise the keyboard shortcut will do nothing and the menu option will be disabled. I prefer vi's persistent per-line display but after years of finding myself on Win2K servers with only notepad available, pressing ctrl-g and then esc to get a quick peek at the line number has become a near-reflex.

  127. Good for ASCII coding by liangzai · · Score: 1

    No Unicode, no GUI. Lame.

  128. Why not roll your own? by Jules · · Score: 1

    You've installed the development tools, right? If not they're in your Applications folder tucked away in something like Installers (I moved mine off to an external drive but they're in there somewhere).

    So, grab the sources but make sure you get the extras as well. Put both in a temp directory, unzip the sources, then the extras, and then do something like

    ./configure --disable-gtktest --enable-gui=carbon --enable-gtk2-check=no --enable-motif-check=no --enable-athena-check=no --enable-nextaw-check=no --disable-gpm --with-mac-arch=ppc

    I'm stuck in the dark (frugal?) ages with one of those old style G4 PowerBooks so ppc makes sense for me.

  129. Speed / Usability Tradeoff by lon3st4r · · Score: 1
    vi / emacs / joe / (your favorite cli editor here) essentially provide a tradeoff of speed. you can either leave the keyboard, grab the mouse, click-click-and-click to get the thing done; or press a couple of keys on the keyboard to achieve the desired action.

    people who use the keyboard a lot would naturally prefer the former.

    having said that, i would love it if vi introduces a nice "menu" interface with key-shortcuts mentioned to achieve the desired task.

    -----------------
    ps: my websites are vi powered ;)

  130. Anyone got some time? by sdfad1 · · Score: 2, Interesting

    Can someone tell me how easy is it to extend vi/vim? I know it's in the manual and all that, but this is a question about the workflow. Can I define a function to be called anytime I want in vi/vim? In Emacs, it's quite trivial:

    C-x b
    That's control-x b, to change buffer ...

    *scratch*
    ... to change to scratch (as in scratchpad)

    (defun blah (arglist) (interactive) (...))
    just type away the function, ... is the required action - it's just code.

    C-x C-e
    evaluate last-sexp. No need to compile. No need to make or whatnot.

    To run it now,
    M-x blah

    That's it. That takes no effort at all. This can be bound to a key by M-x local-set-key (tab completion is your friend here). For frequently used functions, save it in ~/.emacs

    Or alternatively,
    C-x (
    to start defining a keyboard macro.

    ... keystrokes ...
    type your commands here, put some thought into this, could be tricky

    C-x )
    end keyboard macro

    C-x e
    Execute keyboard macro, subsequent e to repeat keystroke sequence.

    To name the macro,
    M-x name-last-kbd-macro (or somesuch, check manual for your specific version), it now looks just like a function. Can be saved, edited, etc by:

    M-x edit-kbd-macro
    or M-x insert-kbd-macro
    Too easy...

    I've heard of users coming up with a Java bytecode disassembler in under 20 minutes using these methods...see here

    Newer versions of Emacs has macro rings for storing multiple macros or whatnot. I know vim has numbered keyboard macros, seems slightly better, but I cannot judge until I've tried it.

    How about vi/vim?

    1. Re:Anyone got some time? by the_greywolf · · Score: 1

      Can someone tell me how easy is it to extend vi/vim? I know it's in the manual and all that, but this is a question about the workflow. Can I define a function to be called anytime I want in vi/vim? In Emacs, it's quite trivial:

      C-x b
      That's control-x b, to change buffer ...

      :n and :p to switch between open buffers. there is also the whole :b family of commands for switching, splitting, opening, closing, etc. buffers.

      *scratch*
      ... to change to scratch (as in scratchpad)

      :badd scratch is one way. :sbl will reveal the new buffer in a split window. ^W commands switch between splits. i'm sure there's another kind of scratch pad you can open as well.

      (defun blah (arglist) (interactive) (...))
      just type away the function, ... is the required action - it's just code.

      function foo()
      let yourcode = 'be'
      endfunction

      C-x C-e
      evaluate last-sexp. No need to compile. No need to make or whatnot.

      no equivalent, AFAIK. Vim scripts are evaluated at runtime.

      To run it now,
      M-x blah

      :foo

      That's it. That takes no effort at all. This can be bound to a key by M-x local-set-key (tab completion is your friend here). For frequently used functions, save it in ~/.emacs

      :map <key> foo

      Or alternatively,
      C-x (
      to start defining a keyboard macro.

      ... keystrokes ...
      type your commands here, put some thought into this, could be tricky

      C-x )
      end keyboard macro

      qx (note no ':' ) begins defining a key recording assigned to 'x'.

      pressing q again ends the recording definition. : commands can be added to the recording as well. all keypresses are trapped. :q will terminate the recording without saving it.
      C-x e
      Execute keyboard macro, subsequent e to repeat keystroke sequence.

      @x will execute the recording named 'x'. @@ will execute the previously-executed recording. . will repeat a previous action. all of these commands can be preceded by a count for the number of times to repeat the action. :<range>@@ is equivalent over a range, repeating the recording on every line in the range.

      of course, being fairly new to Vim myself, i know i have much to discover. :)

      --
      grey wolf
      LET FORTRAN DIE!
    2. Re:Anyone got some time? by sdfad1 · · Score: 1

      Cool, cheers.

      no equivalent, AFAIK. Vim scripts are evaluated at runtime.

      You mean at load time yeah. Presumably you write your code, then quit and restart vim?

    3. Re:Anyone got some time? by the_greywolf · · Score: 1
      You mean at load time yeah. Presumably you write your code, then quit and restart vim?

      certainly not. saved scripts can be :sourced so there's no reason to quit for the sake of a script. anyway, scripts are evaluated as commands at runtime. you can enter a new function as a : command.

      --
      grey wolf
      LET FORTRAN DIE!
  131. also available on windows? by tolonuga · · Score: 1

    is microsoft still shipping edlin?

  132. I suspect Bram is reading, so... by IDontLinkMondays · · Score: 2, Interesting

    I had the pleasure to meet Bram several years back at Linux Expo NY 1999. The man is truly a unique individual. While the majority of Linux geeks (especially the Slashdot crew, who tended to through things at their audience and just act goofy) clowned around a great deal, everyone bragging about thier accomplishments, and of course everyone bragging about all their stocks and options, Bram was very down to earth. This is a man that has legitimately made a tremendous impact on the UNIX world.

    There is a fairly funny story about Bram, we were sitting at the hotel, waiting for a Taxi or something, having a nice discussion about the evolution of Unix (I think, could have been that I was asking him about the Netherlands, who knows, doesn't matter in this context) and this gentleman, a man that I would have otherwise considered a fish out of water in my home town of NYC, performed an amazingly interesting feat.

    There was a man sitting at the bar behind the bench we were sitting on. He had left his overcoat resting on the railing surrounding the bar. Another man came in off the street. He didn't look particularly unusual, maybe a little dirty for someone that belonged in a $300 a night hotel, but construction workers have conventions to, so why not, right? The man from the street stood next to the bench minding his own business as my conversation with Bram progressed, and then out of nowhere, Bram's arm flyed past my head and I found this other man nearly falling on me.

    What had happened was the man from the street began to walk off as if he was heading to a Taxi himself and in the process had tried to take possession of the overcoat of the man at the bar when he wasn't looking. Bram had stopped the thief in the act and after the whole occurance was over, the hotel guard was resolving the issue and the man at the bar was brushing his jacket off and leaving his mouth gaping, Bram sat down and we continued our conversation as if nothing had ever happened.

    Well, it's an interesting story to me at least. Sadly, it really takes a foreigner in NYC to be honest enough to go out on a limb to stop a thief. But the man with the overcoat should be thankful I hope.

    Anyway, Bram, I don't typically talk about where I come from in this board, I like the minimal anonyminity that you're allowed as a logged in poster. But it's good to hear you're back in action. I'd also like to express the considerable pain and suffering I survived having ported a 1.2million line application to QNX using your VIM, I can at least say thanks for :make

    Good luck with future versions, send me a private message if you'd like. It would be good to hear from you again.

  133. Has VIM reached O/S status yet? by master_p · · Score: 1

    The fate of an application is to eventually reach operating system status. In the year 2047, we are not going to use Windows or Linux, but two other competing operating systems: VimOS and EmacsOS. :-)

  134. lmfao! by HaydnH · · Score: 1

    "http://www.hdotrainer.com/"

    Are you telling me that a site that states...

    Unsupported Browser
    This application requires version 6 or greater of Microsoft Internet Explorer. Click here to download the latest version.
    To see which version of Internet Explorer you're using, from your browser's Help menu, choose About Internet Explorer.


    ...was created in vim??? Thanks - I needed cheering up!

    --
    Time is an illusion. Lunchtime doubly so. - Douglas Adams
    1. Re:lmfao! by madaxe42 · · Score: 1

      ~That's actually the old version - new version (done in vim (c#)) isn't yet up.

  135. Modes in Vim getting you stuck? by eugene_roux · · Score: 1

    If you prefer Modeless Editors, have a look at Cream for Vim.

    Personally I dislike it intensely, but it does have a place when people have issues with "Modes" in Editors.

    --
    Part Time Philosopher, Oft Times Romantic, Full Time Unix Geek
  136. Wrong link for CUA. by rubato · · Score: 1

    The Wikipedia article for Common User Access is found at

    http://en.wikipedia.org/wiki/Common_User_Access

    (Note the underlines).

    By the way, note that while there are 600+ posts on this overdone topic, none of the Vi or Emacs fans have bothered to reply to your objection. I too have tried Vi/Vim am sabotaged by muscle memory. But I don't bother anymore when there are superb open-source (configurable, cross-platform, quick-loading, CUA-aware) editors like SciTE (http://www.scintilla.org/SciTE.html) around.

    Not that I think that Vi/Vim are all that well designed, from the point of view of remembering and using keystrokes. H,J,K,L may have seemed logical to somebody once, but my fingers never could "get it", wanting the up-arrow to be over the down arrow. (And is J up and K down or vice versa?) I had to revert to using the arrow keys to get anything done, which I suppose the Vi people will tell you defeats the speed advantage of the editor. I don't think this kind of "learning curve" is worth the trouble.

    1. Re:Wrong link for CUA. by Requiem18th · · Score: 1

      My bad i forgot the' _'! As a matter of fact SciTE is also my favorite text editor for windows and linux and there are many better (but fatter) editors build around scintilla.

      I'm Cream vor vim does a pretty good job at making vim cua complaint, but there are still some very naughy usability issues.

      What few people have notices is that some of the new features of vim are specificaly requested features by the cream team, they have complained that there were limitations in what they could do with cream and this new features allow them to fix their problems.

      So i wouldn't surprise me if the cream developers added these features themselves, i hope that makes the cream project more popular (and more popular = por polished!)

      --
      But... the future refused to change.
  137. I guess no vi user ever learned emacs by Anonymous Coward · · Score: 0

    Vim is one of the fastest editors I've used. I haven't used them all, but I have used Vim, Emacs, ed, notepad and its ilk, and Sam.

    Ooh, notepad! I'm impressed.

    Its first big strength is that instead of hitting your down arrow twenty times then doing the same with the right arrow, for example, you can navigate to the same spot with five keypresses or so. "20j5w" would take you down 20 lines and forward five words.

    So, pretty much like Emacs. (In Emacs, you use an extra keystroke to tell it "do the next command /n/ times", while in vi, you use extra keystrokes to jump in and out of the correct "mode". Either way, 7 keystrokes.)

    Compare that to the hold a key and wait that's commonplace in other editors, or the alternative, which is to fumble for the mouse and attempt to line up your cursor with a tiny row of text then attempt to click between the correct pair of letters.

    I admit, you've really got notepad beat.

    1. Re:I guess no vi user ever learned emacs by Eideewt · · Score: 1

      I'm glad I impressed you with my Notepad skills, AC. I have to tell you that if you're focusing on them, you're completely missing my point.

      I'm familiar with Emacs's universal argument, but it's not really the same as prepending a number in Vi. You've got to do it before every single motion in Emacs, while you only switch to insert mode once in Vi. You're also assuming that you always start in insert mode, switch to command mode, move, and switch back. Normally I find myself starting in command mode, and many edits don't require leaving it.

      As for my comment on mouse usage, I was thinking more about IDE's and the "powerful" Notepad replacements I've seen than Notepad itself (sorry I distracted you by mentioning it).

  138. Yeah, I never said I was a designer by ylikone · · Score: 1

    You are completely right, my site looks like something from the late 90's! Which is basically the extent of my design abilities. I suck at design. I don't have any design smarts. I program the back-ends to sites, that is all. I will eventually go have a look at oswd.org and apply a good looking modern css template to my site.

    --
    Meh.
  139. Ok, revamped by ylikone · · Score: 1

    I've completely changed the look of the site and took out a lot of the garbage. Better now?

    --
    Meh.