3 ms·
> I think I can edit and navigate through text as fast as Vim users, using the native OS text editing hotkeys. This is where I think you are wrong. An experien
by skylerberg 10y ago
> I think I can edit and navigate through text as fast as Vim users, using the native OS text editing hotkeys.
This is where I think you are wrong. An experienced vim user has so many faster ways to edit text than someone limited to what the OS provides. Here are some examples:
yt( - Copy characters up to the nearest (
ci{ - Replace text enclosed by curly braces
:g/\(['"]\).*\1/d - Use regex to delete every line containing a string literal
A vim master has thousands of permutations of commands at their disposal the specify exactly how they want to manipulate text in 5 or less keystrokes.
But navigation is just one great feature. Vim users can travel backwards in time (:earlier 10m), can have multiple clipboards with different content at the same time, easily record macros on the fly.
- aninhumer 10y ago>faster ways to edit text than someone limited to what the OS provides But other editors aren't limited to what the OS provides, they build on those basics to provide most of the same features, but in a way that's intuitive to modern users. For example in Sublime: >ci{ - Replace text enclosed by curly braces Ctrl-Shift-M selects text inside brackets. Subsequent presses work outwards through layers of brackets. >:g/\(['"]\).* \1/d - Use regex to delete every line containing a string literal Ctrl-F Alt-R (['"]).* \1 Alt-Enter Ctrl-L Delete >yt( - Copy characters up to the nearest ( Not available out of the box, but there are plugins for it. Although, in my experience of using vim, the mental effort of working out what character I needed for t/f tended to be far more disruptive than just using arrow keys/mouse. Honestly that was my experience of vim in general. Whenever I had to do anything slightly non-trivial, it took a lot of mental effort to work out the exact command I needed. Whereas Sublime's multiple selections are more intuitive and flexible in unusual situations. To use your regex example above, depending on the context, I'd probably just use Ctrl-D to step through instances of " checking whether each one is a string (which it probably is), skipping any that aren't, and then Ctrl-L Delete. (And repeat for ') If it's a short file, this is probably about as fast, it flows from muscle memory, and it means I'm actually checking through the changes I'm about to make. (And if it was a massive file, I'd use the regex. My point is just that Sublime offers a more ad-hoc way to do bulk edits where you're not exactly sure what you need to match on.)
- allendoerfer 10y ago>Honestly that was my experience of vim in general. Whenever I had to do anything slightly non-trivial, it took a lot of mental effort to work out the exact command I needed. Whereas Sublime's multiple selections are more intuitive and flexible in unusual situations. Vim is humbling in a way. I have been using it for 5 years and while it destroyed my ability to use a non-vim textfield, which shows me what is already ingrained, there is always a faster way to do a task and always room to improve. I like that. You come across a better way to do something and now you just remember to do that one thing wherever it applies until you do not have to think about it anymore.
- emanuelev 10y ago> Although, in my experience of using vim, the mental effort of working out what character I needed for t/f tended to be far more disruptive than just using arrow keys/mouse. I think you maybe didn't give it enough time. What really happens after a while is that you don't have to do any mental effort to do very complex things fast and efficiently. My experience is that after three months I had some sort of clicking in my head and everything made sense. Said that, I wouldn't mind Ctrl-D on vim though, that's one of those sublime's features that I really like (and non consecutive multi line editing).
- aninhumer 10y agoI gave it several years as my primary editor, and I did learn a lot of things. Then I switched to Sublime and became about as proficient in a matter of weeks. I could have put more effort into learning vim, but I didn't have to in Sublime.