this post was submitted on 26 Oct 2024
646 points (96.7% liked)

Programmer Humor

32472 readers
992 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 72 points 2 weeks ago (35 children)

Recently had to edit the hosts-file on a remote host, and I don't know if using two proxy jumps to SSH into it broke it, but it just wouldn't let me select text with the mouse.
I had to duplicate seven lines and edit the IP addresses, and without being able to copy-paste, I already saw myself manually typing it out.

Then I remembered that in Vim, you can do d5↓ to delete 5 lines. Surely that would also work with copying/yanking. And yep, a y7↓ and a paste later and I had duplicated the lines.

Then use the multi-line cursor like I routinely do for changing all 7 IP addresses...
...and now I feel like I've crossed the line where people will think I'm just a wizard.

[–] [email protected] 4 points 2 weeks ago (3 children)

The real question is why you're torturing yourself by manually fixing that stuff? Don't you terraform your Ansibles?

load more comments (33 replies)