r/programming • • May 07 '16

Why Atom Can’t Replace Vim

https://medium.com/@mkozlows/why-atom-cant-replace-vim-433852f4b4d1#.n86vueqci
360 Upvotes

458 comments sorted by

View all comments

Show parent comments

80

u/panorambo May 07 '16

And then follow it up with Why Multiple Cursors Can Never Replace Text Objects.

11

u/drjeats May 07 '16

Would upvote both.

36

u/Black_Handkerchief May 07 '16

How about an ELI5: What are text objects and what are multiple cursors?

I for one would upvote that thread into the stratosphere despite roughly knowing the differences between the Unix text editors.

27

u/phalp May 07 '16

Multiple cursors: exactly what it sounds like. You can duplicate your cursor so every edit you do happens at all of them.

Text objects: most of the editing commands are two-keystroke: the first one indicates the action (like deletion), and the second one says whether to delete a character, a word, six chatacters, the whole line, etc.

5

u/epicwisdom May 08 '16

Wouldn't you need to position your multiple cursors somehow? And that would almost always be aligned with some kind of text objects?

→ More replies (3)

4

u/hetmankp May 08 '16

That's not a text object, you described VIM editing commands. Text objects weren't in the original VI, it only knew about motions (go to end of word, go to end of line, etc). Text objects were added later and they understand more about the structure of the text around the cursor. So in VIM you can give it an action (delete, copy, etc) and either a motion (to end of word, to end of line) or a text object (the current word, the current paragraph, the contents of the current set of parentheses, a quoted string, etc). To make things even more confusing, there are also motions to move to the beginning or end of some text objects.

2

u/Black_Handkerchief May 07 '16

I figured out the cursors (surprisingly), but thanks for clarifying the text objects. I thought it involved multiple buffers. In my opinion 'navigation specifiers' would be a better description for them, but that might just be me.

Edit: never mind, it is all of the different concepts involved; I missed that when I read your comment at first.

→ More replies (1)