6 ms·
You really have to sit down and see a vim user work to start to understand. In vim you don't just move around with arrows, then delete and then replace the tex
by xutopia 14y ago
You really have to sit down and see a vim user work to start to understand.
In vim you don't just move around with arrows, then delete and then replace the text you want. What happens is you can use noun-verb associations to do things.
For example on a line like this:
var foo = "bar";
I could be at the beginning of the line and type the following keys to change the inside of the quotation marks:
ci"baz<esc>
In sublime I would do the following:
<cmd>→←←⌫⌫⌫baz
The difference between the two was an epiphany for me. In vim I could actually use verbs and nouns to determine how I will edit the text in front of me. I now have a language that I can use to edit text rather than editing the text using the most manual of tools and the verbs and nouns combination are only limited by my imagination and the plugins I install.
- anextio 14y agoActually you can do it with: <cmd>-<right>, <option-left>, <option-shift-right>, baz And considering you didn't have to press <mode>: beforehand, it can be just as fast. I'm a vim user, but using it for something like Objective-C in place of the wonderful autocomplete in Xcode would be a totally dumb thing to do. It's simply not smart enough to improve my productivity, even with the slight speed increases with text-manipulation.
- andrew_k 14y agoThat's why I switched to AppCode for Objective-C code editing. It has pretty good Vim bindings plugin, and you still have an autocomplete.
- weaksauce 14y agoTry out xvim if you want to use Xcode + vim. It's still alpha but I use it for all my Xcode editing. Patches welcome. edit: link - https://github.com/JugglerShu/XVim https://github.com/JugglerShu/XVim
- recursive 14y agoIf you're into that sort of thing, you can do Ctrl + F, bar<esc> in Sublime too. Most of the comparisons in this discussion between vim and non vim demonstrate high proficiency in vim, but not as much elsewhere. Of course you are more proficient in the tool you know best.
- why-el 14y agoExactly, and does it really matter? I mean, how many people in usesthis.com actually use Vim? And they are all brilliant people.
- jeffesp 14y agohttps://www.google.com/#hl=en&output=search&sclient=psy-ab&q=site:usesthis.com+vim&oq=site:usesthis.com+vim https://www.google.com/#hl=en&output=search&sclient=... Gives back a list of interesting people. Not that I think it matters if you use Vim or anything particular for that matter.
- lelele 14y agoBrilliant people don't need to be brilliant in everything. You can use lesser tools and still accomplish a lot.
- hollerith 14y agoOr maybe they're not lesser tools.
- lelele 14y agoYes, but the set of brilliant people is larger than the set of brilliant people using the best tool in each area. We don't live in a perfect world, and brilliant people make trade-offs. Unless you know what kind of trade-offs they made, you can't generalize their choices. For instance, when Peter Norvig switched from Lisp to Python for his classes, many people argued that Python was an "acceptable Lisp". When asked about his decision, Norvig answered that Python was a better choice for his teaching goals, and nothing else. Also, let's not confuse techniques with tools. It is unfortunate that, other than modal editing which is too generic, we don't have a name for Vi-style editing which does not involve Vi, so people confuse Vi-style editing (e.g. the technique), with Vi (e.g. the tool). The tool may have its own shortcomings which render it unsuitable.
- ta12121 14y ago
- andyl 14y agoWow - I never realized ci"baz<esc> would work with the cursor starting in column 0 - thanks for this tip !!
- kicweed 14y agoFirst time users of vim would use the arrow keys too. Only after you gain some experience do you start thinking with motions. The same holds true for Sublime Text. Instead of using the arrow keys, you could do any of the following: Ctrl+H : Replace bar : Find what baz : Replace with Ctrl+Shift+H : Replace first match <esc> : Exit replace mode or Ctrl + I : Incremental Find (finds and selects finding) bar : Find & select text baz : Overwrite selection or Ctrl+<Right>+<Right>+<Right>+<Right> : Reach the word bar Ctrl+d : Select word under cursor baz : Overwrite selection or Ctrl+P : GoTo Anything # : Goto word bar : Goto word 'bar' & select it baz : Overwrite selection I agree that vim's vocabulary is very expressive and very powerfull. I switched to Sublime Text because tweaking vim to meet my needs was just too much effort, even for simple things. Couple this with even more effort to make it play nice with Greek (my native language), and the switch came naturally.
- wonderzombie 14y agoIs there a reason why you wouldn't use Vintage with ST2? ci works better in Vim, for sure. But ci is still incredibly useful with Vintage: f"ci"baz
- tripzilch 14y agoIt probably helps to explain that ci"baz<ESC> means: change (c) what's inside (i) the apostrophes (") to baz (baz), end (<ESC>)