9 ms·
I completely understand where you are coming from. For me and others, we actually feel connected to our text instead of Vim. Let me give you an example, let's
by solutionyogi 14y ago
I completely understand where you are coming from.
For me and others, we actually feel connected to our text instead of Vim. Let me give you an example, let's say I have following sentence.
"Why, oh WHY, do those #?@! nutheads use vi?"
my cursor is on the letter 'h' of 'nutheads'.
Let's say I decide to change the whole word to 'crazy people'.
Here's how you would do it in conventional editor (using EditPlus as an example).
Ctrl + <- (to jump to n)
Ctrl + Shift + -> (to select the whole world)
Shift + <- (to remove the space which was selected. )
Type in "crazy people"
Here's how you would do it in Vim.
ciw - (change inner word), it gets rid of the whole 'nutheads' word and puts me in INSERT mode.
type in "crazy people"
As you can see, EditPlus forces to you to navigate the text using conventional method. It doesn't have a concept of a 'word'.
Compare this to Vim. I told Vim what I exactly wanted to do ('change inner word') and it let me achieve that without any fuss.
As I wrote in my other comment, Vim lets me 'talk' and 'interact' with my text at a semantic level. Vim is like a translator which completely disappears when I am working with my text.
The example sentence was borrowed from another excellent article on Vim:
http://www.viemu.com/a-why-vi-vim.html http://www.viemu.com/a-why-vi-vim.html
- deleted 14y ago[deleted]
- calinet6 14y agoExcellent comparison, thanks. It's important to note that many modern text editors do have concepts of "words" and "lines" and such that can be used in similar ways. Granted, not near the extent of Vim, but they're still useful. In sublime for example, I can Ctrl+Shift arrow to select words before and after. This even works with multiple selection (multiple caret positions). It's pretty cool. Again, I understand that Vim is more of a language to describe editing text and is very efficient, I'm just saying you can get close with modern editors, and personally I find their visual language to work better for me.
- solutionyogi 14y agoAs z92 mentioned in reply, you missed my point about the fact that EditPlus or Sublime will force you to move to the beginning of the word before you can select it. Try the above exercise in Sublime and then in Vim so that you can see the difference clearly. May be that will kick in that bulb in your head and you will see Vim in a whole different light. Trust me, it took me a long time before Vim 'clicked' for me.
- recursive 14y ago> Sublime will force you to move to the beginning of the word before you can select it. Only if you don't know how to use it. Ctrl + D does it in fewer keystrokes than you can in vim.
- solutionyogi 14y agoSure, there could be a short cut to make this particular example easy. But can you combine this knowledge and use it everywhere? Let's say your sentence was like this: "Why, oh WHY, do those #?@! 'nutheads' use vi?" [Notice that word 'nutheads' is enclosed in single quotes.] If I am on the letter h, I can press [ciw] to only replace nutheads word with my target word, it will keep the single quotes as it is. OR If I wanted to replace the whole word including the quote, I would press [ciW] (notice the capital W) Now, can you use that knowledge of Ctrl + D in this situation in Sublime?
- recursive 14y agoI'm by no means a sublime expert, but I'd approach those scenarios like this. For replacing the inner content, Ctrl + D still works. To also replace the quotes, I'd use Ctrl + D, Del, Del, Backspace. Yes, in the second case, Sublime is one additional keystroke. I know you could come up with examples that would show bigger advantages for vim. FWIW I do believe that vim has advantages to some editors in certain scenarios, but I think those advantages are overestimated by the vim-inati. If you've spent years learning one editor, of course it will seem more capable than editors you have used less.
- z92 14y agoWhen your cursor is in the center of the word, you can't use ctrl-shift arrow to select that word [it will only select part of the word]. Therefore first you need to move cursor to a side, then start your ctrl-shift work that you described. GP highlighted this special thing. I guess you missed his main point.
- dllthomas 14y agoIn terms of finger travel, if I've already moved my right hand to the arrow keys, and my left hand to ctrl and shift, then it's simply hold-ctrl, left, start holding shift, right. While not quite as simple as ciw, my main complaint is moving my right hand all the way over to the arrows and back; complaining about the comparative complexity of the sequence seems ridiculous.
- lelele 14y agoWhat annoys me about the arrow keys is that I can't reach them without looking, and they also change position on different keyboards (standard keyboards vs laptop keyboards, for example). Having to look to the keyboard distracts me.
- dllthomas 14y agoAgreed - needing arrow keys in the middle of doing anything else is bad. My point was that, in this particular case, the fact that the arrow keys are needed is basically all of the bad, and that the parent's complaint of increased complexity/typing is certainly not strong and perhaps not valid.
- lelele 14y agoMainstream editors get close to Vim only if you use Vim as it were a mainstream editor. Yes, on a mainstream editor you can use Ctrl+Shift+Arrow to select words - which already requires you to move your hands way more than Vim would - but - among other things - how do you cut/change/copy text: - up to a specific character? - up to a specific string? - up to the beginning/end of a document? - up to the beginning/end of a sentence? - up to the beginning/end of a paragraph? Good luck ;-) Maybe these examples are lame because I haven't edited text in a while and I couldn't think of anything better, but I hope you can see what we are talking about. Read PG's essay about Blub languages and Lisp, then replace Blub with mainstream editors and Lisp with Vim and you'll understand why Vim is better. My colleagues used to ask me why I kept using a weird editor, and when I answered they replied the same way you have done, yet they always marveled at me editing texts at insane speeds. Go figure. With Vim, you also have a reduced mental load, as its command set relies on intuitive and flexible composition. Actually I don't even use Vim. I use a Vim mode for GNU Emacs, which gives me these added advantages: - learning a Lisp (ask Eric Raymond why this is advantageous); - having a powerful batch text processing tool (no need for Perl, Awk, and the likes); - a box of tools for several tasks which are more powerful than mainstream ones. Have fun.
- calinet6 14y agoI love how every Vim user speaks to non-Vim users as though they're novices that are just "not there yet." It's cute.
- lelele 14y agoNon-Vim users are novices that are just "not there yet", when it comes to text-editing. The Vim way is the most simple and effective way to edit text by means of a keyboard. Like Lisp and the Dvorak keyboard, it's alien, but it's actually simpler. Maybe, now that touch-screens are becoming commonplace, an equally or more effective new way will be developed.
- swah 14y agoMy guess is GP knows how to use Vim, and yet he's happy to use something else... but many Vim users can't imagine that scenario. I personally know and like Vim and Emacs, but I'm using ST2 because those editors lose some of their greatness on vanilla Windows. And Emacs keybindings do hurt my wrists. Also, I could never get really fast at editing multiple files inside a single Vim session. Nothing near Emacs with ido.el or vanilla ST2. I already tried Lusty* packages and Nerd* packages... It's also kinda hard to prevent :q from quitting the whole editor, which always bugged me. When I open it from the terminal for a quick fix on a single file, Vim works very naturally and I think, once more, "hey that edit was easy and fast - why not switch to it as my main editor?"...