r/ProgrammerHumor • • Apr 20 '15

vim

Post image
1.3k Upvotes

427 comments sorted by

View all comments

Show parent comments

86

u/noop__ Apr 20 '15

Because it let's me modify text faster, and more precisely than any other text editor in existence. And the portability (console based, *nix) makes it so I can have the same text editing workflow on all of my machines including the several thousand headless servers I manage.

28

u/iLostMyAcc Apr 20 '15

" it let's me modify text faster, and more precisely than any other text editor in existence." Do you have a example?

26

u/noop__ Apr 20 '15

The vast array of movement and editing commands, and the modal interface with which they're presented allows almost anything to be just a couple of keystrokes away rather than being hidden away in the menus of gui text editors. Yeah, there's a steep learning curve to vim, but once you get the hang of it, you'll feel completely crippled in anything else (of course, until you get really good with $othereditor, but then you can make this decision for yourself, and I'll bet $10 you'll choose vim).

51

u/larhorse Apr 20 '15

so no on the example?

I mean, don't get me wrong, I absolutely understand the point about having an editor that I can use on a headless server pretty much anywhere, and I put up with vim during day to day use because of that. (cause really, VIM is better than nano at least)

That said, I vastly prefer pretty much anything else for actual coding. Sublime, Atom, TextMate, hell even Notepad++ if I happen to be stuck on windows (although NEVER notepad).

I even caved two years or so ago, and spent 6 months using nothing but vim to see if it changed my feelings about it. I really wanted to feel like I was being more productive, but in all measures, I wasn't. Turns out the mouse is REALLY damn good at doing things like selectively targeting text and precisely moving selections. It's almost like it was designed for that task. Plus it means I don't have to keep hundreds of esoteric key commands in my head!

0

u/[deleted] Apr 20 '15

[deleted]

2

u/Tarmen Apr 20 '15

I just can't get used to easy motion. I think it is because I have to parse the key assignment whenever I want to use it but it totally brings me out of what I am doing.

2

u/kjanssen Apr 21 '15

Hell, regular vim just using visual mode wrecks mice for moving text selections. Just Vjjjjjd (or V5jd (or just d5j)) and then p to put it where you want. Non block selections obviously require more specific movements, but most of the time I'm working on whole lines anyway.

18

u/noop__ Apr 20 '15 edited Apr 20 '15

90% of my editing (4-12 hrs/day depending on the day), is done through an ssh session, so gui editing isn't really even a valid comparison. But that's just my use case. Obviously if another tool works better for you, you should use it.

and spent 6 months using nothing but vim to see if it changed my feelings about it

That is not nearly enough time to learn vim. I learn new stuff about it (and it makes me better) every week, and I've been using vim as my exclusive editor (aside from when I'm giving new stuff a shot) for the last decade.

12

u/muffsponge Apr 20 '15

So, if spend more than 6 months learning vim, will I ever make up that time in productivity? I feel comfortable using mouse in an IDE with intelligent autocomplete to get things done quickly. I just can't seem warrant the extra time to learn and remember all these commands.

17

u/noop__ Apr 20 '15

I just can't seem warrant the extra time to learn and remember all these commands.

Then don't :). Nobody is saying you have to use vim. At the end of the day, it doesn't matter what tools you use, it matters how well you do your job. If you think you're at your best using a gui editor, totally do it.

17

u/Mavamaarten Apr 20 '15

Nobody is saying you have to use vim

Uhhhh... I have never talked to a vim user without him telling me I should use vim.

15

u/Sean1708 Apr 20 '15

Oh? Well now you've talked to several.

9

u/WallyMetropolis Apr 20 '15

Wait, uh, aren't you doing that right now?

3

u/[deleted] Apr 20 '15

You probably just don't know that most vim users are vim users cause they don't tell you to use it.

6

u/[deleted] Apr 20 '15 edited Jul 13 '23

Removed: RIP Apollo

→ More replies (0)

0

u/[deleted] Apr 20 '15

[deleted]

27

u/PhoenixCloud Apr 20 '15

Vim sounds like a religion...

16

u/Lyqyd Apr 20 '15

Or a cult, depending on who's talking about it.

2

u/greyfade Apr 21 '15

http://www.catb.org/jargon/html/H/holy-wars.html

Hardy perennials include EMACS vs.: vi, my personal computer vs.: everyone else's personal computer, ad nauseam. The characteristic that distinguishes holy wars from normal technical disputes is that in a holy war most of the participants spend their time trying to pass off personal value choices and cultural attachments as objective technical evaluations. This happens precisely because in a true holy war, the actual substantive differences between the sides are relatively minor. See also theology.

4

u/synth3tk Apr 20 '15

Well, you're not wrong. Have you ever had interaction with a Vim user?

→ More replies (1)
→ More replies (1)

4

u/DrHenryPym Apr 20 '15

Small example:

  1. Use * on a word, and it will search for that word.

  2. Use ce to change the highlighted word.

  3. Use n to find the next word.

  4. Use . to repeat the last change.

  5. Repeat steps 3 and 4. (Only two keyboard presses)

Or:

  1. :%s/<Ctrl-r> //new_word/g

<Ctrl-r> / will access the register used for searching.

<Ctrl-r> " will access the last copied or deleted text. Use p to paste it wherever.

<Ctrl-r> + will access clipboard.

I know that most editors can do all this very simply, but the fact that it only takes a few keypresses to quickly automate some editing goes a long way.

→ More replies (2)

6

u/scragar Apr 20 '15

I have 1 big argument, 54 buffers/clipboards(a-z, A-Z, * is your normal clipboard and there's the standard buffer it will use if none is specified), combine with a similar number of bookmarks(52 in total, a-z are unique per file, while A-Z are unique across the whole profile and will open the file the bookmark was last placed in if you jump to it) makes it insanely powerful.

Yes, it takes a great deal of getting used to, but it's hard to question how handy it is(I mean given the improvements of win7/8 it's now almost as good as a Linux distro, but I still really miss 2 clipboards/buffers at work).

→ More replies (1)