4 ms·
I just installed vim and tried to use it. For those who don't live in the dark ages, vim is still a command-line editor, and it still has the classic vi modes -
by lutusp 13y ago
I just installed vim and tried to use it. For those who don't live in the dark ages, vim is still a command-line editor, and it still has the classic vi modes -- one mode for loading and saving files, one mode for moving the cursor around, one mode for deleting text, one mode for typing in new text, one mode for searching, etc. etc..
In other words, it's vi with a few changes. I still can't navigate while typing, or delete while navigating, or search while deleting. As I tried to remember all those weird incantations that I last used in the mid 1970s, I felt as though I was in a time warp.
Guess why Apple Writer was so popular in 1979 (http://en.wikipedia.org/wiki/Apple_Writer http://en.wikipedia.org/wiki/Apple_Writer), in spite of its many limitations? I wrote Apple Writer specifically to avoid the handicaps built into vi, which was the default editor in those times. After Apple Writer came out, people would write articles saying things like, "My God! With Apple Writer, you can read files, write files, type, navigate and search without having to change modes! How did Lutus do it?"
The answer is simple. Apple Writer wasn't so extraordinary, but I wasn't mentally crippled by the vi code base or method of operation, and I wasn't averse to exposing people to new ideas. But you know what? If I was told that people would still be using vi thirty-four years later, and boasting about its wonderfulness, I would have fallen down laughing.
Even pico and nano are easier to use, and they're desperately weak.
I shouldn't complain. Apple Writer made me a multimillionaire through the simple virtue of not being vi, and little else. I should thank you people.
- aidos 13y agoKudos on Apple Writer - but I think you're confusing easy to learn and more powerful. The modes that you complain about (and let's be honest - there are really just 2 that you use) are what make it so powerful. You don't go into another mode to perform those operations - they're already there, and just a keystroke away. You go into another mode to insert text. By making that compromise you make the system faster and more powerful but it needs to be learnt. That's where you won - you dropped the barrier to entry.
- lutusp 13y ago> The modes that you complain about (and let's be honest - there are really just 2 that you use) ... No, to switch from entering text, to deleting text, to searching for text, to copying and pasting text, to saving a file, to loading a file, all require switching modes. Let's be honest. > By making that compromise you make the system faster and more powerful ... Having to enter additional keystrokes, a throwback to a computer keyboard that either didn't have control keys or couldn't exploit them, makes editing "faster and more powerful"? Nice reasoning.
- jamesbooker 13y agoNo extra keystrokes required, which was your original argument, moron. Please fuck off, actually learn to use vim properly (its changed a lot from the ancient editor you used) and then come back with some arguments that are accurate and based on facts. I guarantee you will learn a few things that you can out into that crappy editor that you maintain (you know, the one that needs an ENTIRE JRE TO RUN)
- aidos 13y agoYou'll need to provide explicit examples of where any of those operations requires more keystrokes in vim than any other editor - I can't think of any. You're calling vim commands "modes" to deliberately make it sound more complex than it is. I want to change to next 3 words. I type 'c3w' - you're saying that's modal - which it sort of vaugly is. I could have done 'v3w' to highlight the next 3 words (something you would do in any other editor). Then I hit 's' to substitute them for something else. No mode involved (other than the selection - which is the same for any editor). I stand by my assertions - it's up to you to provide the counter examples to back up your claims.
- klibertp 13y agoActually, having numerical prefixes to commands is not a feature constrained to modal editors. In something like Notepad, to replace three next words, you need to press shift+ctrl and hit right arrow three times, then just start typing. The only inefficient thing here is a repetition of left arrow, and it's solved in Emacs, where to do the same, you'd press Ctrl+3 Ctrl+<right> and then started typing (if you have delete-selection-mode enabled). So it's very similar to <esc>c3w in terms of complexity, really. On the other hand - I don't quite understand what lutusp means by "modes" - by what he writes here, I'd say that Emacs enters "command mode" after pressing (for example) C-u in exactly the same way Vim does after <esc>. Actually any editor with commands bound to key sequences can be said to be modal in the light of what he writes. And Shift+Right and then writing something is a command bound to a sequence of keystrokes, which means I'm using a modal editor right now, writing in a textarea in Chrome. I don't think that's what lutusp wanted to say, though.
- mheathr 13y agoThere are at least 6 that are explicitly used (there are more in practice but they are mostly transparent of rare and even realizing this will require reading some of the more esoteric documentation): visual line mode, insert mode, ex mode, normal mode, replace mode, visual block mode.
- lutusp 13y agoThanks. I got tired of trying to use vi/vim before fully plumbing the depth of these additional modes.
- djur 13y agoPlease tell us more about your fantastic accomplishments.
- capisce 13y agopico and nano are certainly easier to use and have a much less steep learning curve, but they can hardly match the efficiency with which I can refactor and edit code using vim
- _cipher_ 13y ago> Guess why Apple Writer was so popular in 1979 (http://en.wikipedia.org/wiki/Apple_Writer http://en.wikipedia.org/wiki/Apple_Writer), in spite of its many limitations? Guess why so many people still use Vi(m) and not Apple Writer.