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

2

u/[deleted] May 07 '16

[removed] — view removed comment

0

u/[deleted] May 07 '16

[deleted]

6

u/[deleted] May 08 '16

That's a solution looking for a problem. It comes up rare-enough that the mental overhead of knowing the command is less useful than other obscure tricks I know. Obsessively studying regexps has been far more useful to me than that would be.

8

u/Disgruntled__Goat May 08 '16

This argument is always brought up and it's completely spurious. How do you know you need to delete exactly 17 lines? By the time you've counted them, I've already selected them with my mouse and hit delete.

No one edits code/text like you suggest. We do so visually. If I want to delete a function I can already see that visually on screen, it's easy to select that with the mouse or press Ctrl+L a few times.

5

u/yads12 May 08 '16

Relative line numbers

0

u/Disgruntled__Goat May 08 '16

(a) You still have to turn that mode on/off when you need it.

(b) You still need to look at the line you want to delete to, then type that number. Meanwhile I've already selected the block.

1

u/AcousticDan May 08 '16

dd . Until they're gone.

1

u/brcolow May 08 '16

No need to count, just use set relativenumber in vim.

0

u/silveryRain May 08 '16

You're missing his larger point that what you delete can be many things (paragraphs, lines, code blocks. you name it) and in any amount. I can visually count about as much as six lines (enough to make it worthwhile for me, YMMV), and paragraphs and blocks may not even need counting, if you're familiar enough with the text. For counting lines, there's rnu when you find the counting difficult, and for more complex selections vim provides three different visual modes.

Keep using whatever you want, but stop making assumptions about how other people work.

1

u/Disgruntled__Goat May 08 '16

You're missing his larger point that what you delete can be many things

No, I answered that.

0

u/mvm92 May 08 '16

line numbers and simple arithmetic.

0

u/sweettuse May 09 '16

this misses the point of vim/vim-style editing. first, i rarely use vim to code. but secondly, sure, there are definitely other ways to do it. but once you're proficient at vim, you'll be like "why would i do this any other way?" because every other way is literally less efficient. but it is confusing at first, definitely.