5 ms·
I would really like to know what options are there that are more efficient than VIM for text editing... And when talking about IDEs and code writing remember t
by klibertp 14y ago
I would really like to know what options are there that are more efficient than VIM for text editing...
And when talking about IDEs and code writing remember to include VIM plugins in comparison.
- lutusp 14y ago> I would really like to know what options are there that are more efficient than VIM for text editing... In answer, I have to say that nearly every other text editor that exists is more efficient than vi/vim. Modern editors are mode-free, meaning (don't faint) you don't have to change modes to insert, delete and navigate. These editors don't need "cheat sheets" to help you figure out how to switch modes and navigate, because you don't have to cheat. Vi/vim is the oldest editor still commonly available. I used it in the 1970s when I worked for NASA, on a "paper terminal". In that environment, its quirks made sense because they saved paper. Since then, it has been completely superseded by newer, better programs. Even my now-ancient program Apple Writer (http://en.wikipedia.org/wiki/Apple_Writer http://en.wikipedia.org/wiki/Apple_Writer) was easier to use, largely because my program addressed and solved some of vi's more annoying problems. There's a reason Apple Writer became a best-seller -- one of them was that fact that, by eliminating modes, it represented a huge improvement over existing editors, including vi. But that was the early 1980s. If I had been told then that I would still be trying to get people to use more efficient editors over 30 years, later I would have laughed -- impossible!
- falcolas 14y agoSpeaking only to one of your many weak arguments: > These editors don't need "cheat sheets" to help you figure out how to switch modes and navigate, because you don't have to cheat. I haven't used a cheat sheet with vim in years now. I don't think I used a cheat sheet after a month of using vim. `:w` is as natural to me as ctrl-s. Slightly more natural, because I don't have to think in order to turn a save into a save as, if I want to write the contents to another file. And if we want to talk cheat sheets, wouldn't you consider menus in non-modal editors to be cheat sheets, since they show both the keyboard shortcut, and the action, side by side?
- lutusp 14y ago> `:w` is as natural to me as ctrl-s. Yep. And it is two keystrokes instead of one. Wouldn't it be more efficient to eliminate one of those keystrokes rather than committing them to memory? That's the approach taken by all editors written since about 1980, so it seems to be an idea whose time has come -- and passed. > And if we want to talk cheat sheets, wouldn't you consider menus in non-modal editors to be cheat sheets, since they show both the keyboard shortcut, and the action, side by side? The "cheat sheets" I refer to are those that map multiple-keystroke sequences to the actions that, in a modern editor, require one keystroke.
- falcolas 14y ago> And it is two keystrokes instead of one. Technically, it's three keystrokes instead of two. And you have to commit ctrl-s (or cmd-s if you're on a mac) to memory just as much as you do :w. Nothing really saved there. > The "cheat sheets" I refer to are those that map multiple-keystroke sequences to the actions that, in a modern editor, require one keystroke. Like delete the next four words? How do I do that in a modern editor with a single keystroke? How about "replace everything inside these quotes"? Or repeat the last action I just took again? I'm glad you like your modern editors (there's lots there to love), but they are not inherently better than vim just because they're non-modal. There is typically a more shallow learning curve than VIM, but the simple virtue of being non-modal doesn't guarantee that (sorry, Emacs). In the end, two things sealed the deal for VIM for me. 1) it's on every remote server I have to access, and 2) I've put the time into it, so I'm quite efficient in it. In my last job, since I was only doing local development, I tried out Sublime Text 2 for a good 3 months before giving up on it. I was constantly thinking "I know how to do this in vim - how do I do it here?", and ultimately, I got tired of constantly reaching for the mouse for trivial things like selecting and moving text. I felt that 3 months was sufficient to really give ST2 a fair shake, so I didn't (and still don't) feel bad when I went back to the terminal.
- lutusp 14y ago> I'm glad you like your modern editors (there's lots there to love), but they are not inherently better than vim just because they're non-modal. Yes, in point of fact, they are better than vi/vim because they are non-modal. When all is said and done, dropping vi's modes makes an editor better and more efficient. > Like delete the next four words? How do I do that in a modern editor with a single keystroke? You can't delete four words with a single keystroke. You can delete [N] words, but only after switching modes and choosing the desired number. Source: http://www.lagmonster.org/docs/vi2.html#delete http://www.lagmonster.org/docs/vi2.html#delete Quote: "ndw : Deletes the next n words starting with current" The above assumes you're already switched to the required mode, so a minimum of four keystrokes if the number [N] is a single digit. Then, to continue typing, you have to switch back to the mode you started from. Total five keystrokes minimum. > In the end, two things sealed the deal for VIM for me. 1) it's on every remote server I have to access, and 2) I've put the time into it, so I'm quite efficient in it. This is circular reasoning. The reason vi or vim is out there on all those servers is because of the number of people who haven't learned anything else.
- klibertp 14y agoFirst, I don't know vi. Well, I am aware that something like this exists, because I see "{not in vi}" everywhere in VIM docs. So maybe you should familiarize yourself with VIM before talking about it - for example I noticed that you wrote that "[in modern editors] there is no need to wonder in what mode you are" as if it was a problem in VIM. It's true for vi, but VIM has a mode indicator on a status bar since times immemorial. Second, in VIM there are three modes, that's true, but not the ones you enumerate. There is: insert mode, normal mode and visual mode. All modern editors have at least the last one: the editor (all of them) behaves differently when you have some text selected. Third, in VIM you can freely delete and navigate (with arrows!) in insert mode. No problem at all. Even things like ctrl+left for to skip a word backwards work. Fourth, sheer amount of commands and functions makes the cheatsheets you mention valuable, they are not needed because the functions are so weird, they are needed because there is so many of them. I saw cheatsheets for Word and Photoshop too. You could argue that paint is better than photoshop because you don't need a cheatsheet to use it, but I doubt you'd want to do that. It's the same for editors: you don't need a cheatsheet for notepad... Fifth, VIM evolved to the point that it is effectively a platform for building text processing apps, similar to Emacs. There's VIMScript and Python, Ruby and Lua support. With this there is practically no limit to what you can make VIM do for you. To summarize: you seem to mistake VIM for vi; please take a closer look at modern VIM and then come back with a critique that makes sense in 2013.
- lutusp 14y ago> It's true for vi, but VIM has a mode indicator on a status bar since times immemorial. That's a nice improvement -- an indicator to tell you which of the three exclusive modes you're in at the moment. But imagine this -- imagine eliminating both the indicator, and the modes, all in one fell swoop, as modern editors have done. > ... please take a closer look at modern VIM and then come back with a critique that makes sense in 2013. When I wrote Apple Writer in 1978, I rendered vi/vim obsolete (and my program became a best-seller based on its ease of use). Among other things, Apple Writer didn't either have or require modes. Neither have any more recent editors, all of which had to compete with Apple Writer or its descendants.
- 14y ago