this post was submitted on 13 Jun 2023
45 points (94.1% liked)

Programmer Humor

31953 readers
1333 users here now

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

Rules:

founded 5 years ago
MODERATORS
 

I tried a couple of times and it's still magic to see anyone able to use it properly

I'll just stick to VScode for now I guess

top 29 comments
sorted by: hot top controversial new old
[–] pete@lemmy.world 4 points 1 year ago (1 children)

If you are actually interested in learning, it's not too hard, you'll be slow for a little bit but it pays off in the end.

First, understanding there are actions and objects and quantifiers. Actions are what you do to objects, so when you want to (d) delete, that is the action, then you'd want to specify a object. ($) being the end of the line, (^) start, (w) is word, (j), (g) is top of file and so on, these are already the words you'll use to move along as well.

Then, for many of these we can add quantifiers, i.e. repeat x number of times.

So 3dw is delete three words and 3dj is three lines down and so on. If you want to select, it's just swap v for d and off to the races.

Once you learn the basic concept, you really only need a few actions and a few objects to be functional.

Print/find/make a cheat sheet and put it up by your monitor or keyboard and give yourself a week.

Also, checkout the vimtudor or vim golf and play the game for a few minutes.

[–] StV2@lemmy.world 0 points 1 year ago (1 children)

Honestly that ability to edit stuff sounds really cool to be able to do

Maybe I should start out by making a cheet sheet with your comment in it and just try doing some basic editing with it

[–] datendefekt@lemmy.ml 3 points 1 year ago
[–] OsrsNeedsF2P@lemmy.ml 2 points 1 year ago (2 children)

PSA: run vimtutor in the terminal

[–] SemioticStandard@lemmy.ml 1 points 1 year ago

This is exactly how I learned all those years ago, and to this day, I still use vim regularly. As in, literally, I was using it on a server this morning to make some changes. It's just become natural to me now.

[–] StV2@lemmy.world 1 points 1 year ago

Oooh that's a handy feature I didn't know about

[–] SinJab0n@mujico.org 2 points 1 year ago
[–] TheInsane42@lemmy.ml 2 points 1 year ago* (last edited 1 year ago) (1 children)

Drat, I've been working with vi for 35y now... (feeling old) I'm glad I now know how to kill the mouse functions in vim so X clipboard works. ;)

Tried emacs once (in '94)... opened an extra xterm and killed it as I couldn't figure out how to save and exit. (it's just what you're used to ;) )

[–] Tovervlag@feddit.nl 1 points 1 year ago (1 children)

so.. how does one kill the mouse functions?

[–] TheInsane42@lemmy.ml 1 points 1 year ago (1 children)

With a stick ;)

From my .vimrc:

" disable mouse
set mouse-=a
[–] Tovervlag@feddit.nl 1 points 1 year ago
[–] degrix@lemmy.world 1 points 1 year ago (1 children)

I've tried for years to master vim, but still fall back to old habits. I have gotten to the point where single file editing is faster in vim than in IntelliJ, but still haven't figured out the mysteries of vim buffers and multi-file editing.

[–] pete@lemmy.world 1 points 1 year ago

Buffers are great, but I mostly go for tabs. :tabnew :tabnext :tabmove and so on.

[–] Fiech@discuss.tchncs.de 1 points 1 year ago

As a long time vim user with many macros and plugins, etc. and I love using it. But I have to say, it's hard for me to actually suggest vim to anyone new, because of how long it takes until you actually start using it comfortably...

[–] jakoma02@czech-lemmy.eu 1 points 1 year ago

By the way, the vim extension for VScode is great, so why not combine both.

[–] BrownPolarBear 1 points 1 year ago

somehow I read the last frame as "stop tinkering with your setup, use the bloody mouse and get the job done"

[–] NettoHikari@social.fossware.space 1 points 1 year ago (1 children)

I still remember first opening vim many years ago ...

... I still haven't figured out how to close it.

[–] StV2@lemmy.world 1 points 1 year ago

I'd tell you to Google it but that'd involve closing it in the first place

[–] cleareyes@lemmy.ml 1 points 1 year ago

I mean I use the vim plugin in IntelliJ lmao.

I’m no expert but it’s much more enjoyable writing code when you don’t have to go handle your mouse every 1 second.

[–] JoYo@lemmy.ml 1 points 1 year ago

I get the feeling that every developer with this midnset still uses a tenkey.

[–] Davel23@lemmy.ml 1 points 1 year ago

35 years ago (give or take) I used vi (no "m") for email and Usenet. I doubt I could remember how to do anything useful with it now.

[–] nobloat@vlemmy.net 1 points 1 year ago

I am weird in that I never used VScode before. I started with Vim and just kept using it. It's like second nature now. I sometimes end up using the keybindings somewhere else and realize what I'm doing

[–] alokir@lemmy.world 0 points 1 year ago (1 children)

VSCode has a vim plugin, you should try it

[–] petriborg@lemmy.ml 1 points 1 year ago

I would never use an IDE that didn't have a Vi/Vim mode or plugin :-)

[–] jmsw22@lemmy.ml 0 points 1 year ago (1 children)

I have about 30 years of my career left. That's not enough time for the return on investment of learning VIM to payout.

[–] taj@lemmy.ml 0 points 1 year ago (1 children)

Eh. I know the basics. I can open, do some very basic editng, save and close. That's about as much as is really needed, right?

[–] MoreIronOre@lemmy.ml 3 points 1 year ago

You can close VIM? Fucking legend.

[–] Ansis100@lemmy.world 0 points 1 year ago

I fell in love with Vim a while ago, but it's missing a lot of the core features of VSCode. However, the Neovim-VSCode integration has been a saviour. All the cool features of VSCode combined with the text editing speed of Vim.