this post was submitted on 05 Nov 2024
462 points (98.1% liked)

Programmer Humor

19471 readers
1447 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
all 49 comments
sorted by: hot top controversial new old
[–] emuspawn@orbiting.observer 10 points 7 hours ago

unrepentant nano gang rise up

[–] LordWiggle@lemmy.world 4 points 6 hours ago (1 children)

Sorry for living under a rock, but what is vim?

[–] pmk@lemmy.sdf.org 4 points 2 hours ago (1 children)

It's a text editor. It all began with the ed editor, which is very simple and does one thing, it edits files. Then someone extended it into the ex editor. Then someone added a new feature: being able to visually see the file you're editing, which became vi, the visual editor. Then someone improved that, into vim. What began as an editor where you needed to be fluent in regular expressions but otherwise was simple, is now a very complex editor, moving the functionality of the old UNIX tools into the editor itself.

[–] LordWiggle@lemmy.world 2 points 34 minutes ago

Thank you for explaining!

[–] cupcakezealot@lemmy.blahaj.zone 2 points 5 hours ago
[–] bluewing@lemm.ee 2 points 6 hours ago
[–] kittenzrulz123@lemmy.blahaj.zone 19 points 11 hours ago
[–] T156@lemmy.world 2 points 7 hours ago

At least it's better than ed.

?

[–] Kojichan@lemmy.world 7 points 10 hours ago

hides in Kate and a Codium-based IDE

[–] pinkystew@reddthat.com 10 points 11 hours ago (4 children)

The first time I used VI I typed a few characters, then hit backspace to delete some characters. Backspace doesn't delete characters. I closed VI and never opened it again.

[–] fin@sh.itjust.works 7 points 6 hours ago

But how did you close it?

[–] hakunawazo@lemmy.world 15 points 10 hours ago

Yeah yeah, brag about being able to close VI the first time of use...

[–] zarkanian@sh.itjust.works 1 points 7 hours ago (1 children)

And you weren't curious about how it worked? Not at all?

[–] pinkystew@reddthat.com 3 points 7 hours ago

A million better alternatives exist. I was curious about them.

[–] Anticorp@lemmy.world 5 points 11 hours ago (1 children)

You need to type i first to enter insert mode.

[–] QuazarOmega@lemy.lol 4 points 11 hours ago* (last edited 11 hours ago) (1 children)

Now I can't exit HELPPP^C^C

[–] sorter_plainview@lemmy.today 11 points 15 hours ago (5 children)

Tried neovim a couple of times. Stopped after 10 or 15 mins. Anyone has useful tips to get used to vim/neovim?

[–] zarkanian@sh.itjust.works 4 points 7 hours ago

There are plenty of cheat sheets online. The main thing is understanding that there are different modes, knowing what they do, and how to switch between them and issue commands.

[–] akkajdh999@programming.dev 11 points 10 hours ago

Pro Tip: to learn to do something, practice doing it

[–] hakunawazo@lemmy.world 4 points 9 hours ago

I became a fan after I got used to nice color schemes, buffers/tabs, horizontal/vertical splitting, file browsing with NERDTree and highlighting changes with GITGutter.

You ask for tips? Add VIM commands you use regularly (like paste mode toggle for example) to a keyboard shortcut (like leader key + p) in your .vimrc settings file. It increases working speed.
Also add some plugins, they are fun and add useful functions from other editors like Sublime (ctrl-p, vim-multiple-cursors).

[–] grrgyle@slrpnk.net 18 points 14 hours ago (1 children)

Just get used to

  • using movement (hjkl),
  • going between insert and normal modes (i and esc),
  • undoing (u from normal mode),
  • and saving (:w and :wq).

Don't try to do it all at first, just get comfortable with the essentials. You can even just stay in insert mode (the only mode in most editors) at first.

Keep a vim basics cheat sheet handy for a couple weeks as you're building in muscle memory, then slowly work in more advanced techniques and combinations.

It doesn't take long before you start having a lot of fun just manipulating text.

PS here's a decently basic cheat sheet I found: image describing basic vim keyboard bindings and commands

[–] Passerby6497@lemmy.world 1 points 9 hours ago

I always forget about :wq, mainly because escing out of interactive mode and hitting ZZ is so much quicker.

[–] TechieDamien@lemmy.ml 6 points 15 hours ago

Go through the tutorial. It is quite good and teaches things incrementally with real world examples. Just run vimtutor to start.

[–] nobleshift@lemmy.world 13 points 16 hours ago

VIM only has two modes:

Constantly beeping

Destroying everything.

[–] Malix@sopuli.xyz 50 points 21 hours ago (2 children)

well, I am using vim, but I don't know how to use vim.

Am I vimming?

[–] squirrel@discuss.tchncs.de 30 points 21 hours ago (1 children)
[–] zloubida@lemmy.world 15 points 20 hours ago

They vom it.

[–] 1984@lemmy.today 6 points 19 hours ago (2 children)

If you dont know how to exit vim, then yes you are...

[–] Anticorp@lemmy.world 2 points 11 hours ago

Escape, :wq!

Escape enters command mode

: prompts the command

W = write

Q = quit

! forces it

[–] Malix@sopuli.xyz 7 points 19 hours ago (2 children)

:what^C^C^C^Z^Z^C^ESCFFUUUUUUUUUU...

[–] 1984@lemmy.today 7 points 18 hours ago

I remember that experience first time and how I had to kill the process from another shell :)

This was before the internet so couldn't exactly google it either.

Fun times. But I figured it out by reading the man page.

[–] xlash123@sh.itjust.works 13 points 17 hours ago (2 children)

I'm always vimming!

Not because I want to though. It's because I don't know how to stop...

[–] nobleshift@lemmy.world 27 points 16 hours ago (1 children)
[–] bandwidthcrisis@lemmy.world 7 points 15 hours ago

That's, like, halfway down the list of things to try!

https://github.com/hakluke/how-to-exit-vim

[–] bruhduh@lemmy.world 5 points 17 hours ago (1 children)
[–] 0ops@lemm.ee 2 points 9 hours ago

We're you referencing this by chance?

[–] seaQueue@lemmy.world 13 points 20 hours ago

Emacs users be like

[–] horse_tranquilizers@sh.itjust.works 5 points 19 hours ago (2 children)
[–] Anticorp@lemmy.world 1 points 11 hours ago

Sorry bub, but you just wasted your time

[–] geneva_convenience@lemmy.ml 2 points 13 hours ago

Progress lost

[–] jbrains@sh.itjust.works 5 points 20 hours ago (2 children)
[–] Jumuta@sh.itjust.works 5 points 17 hours ago* (last edited 17 hours ago) (1 children)

fellow noun->verb user :)

helix superiority however.

[–] jbrains@sh.itjust.works 4 points 14 hours ago (2 children)

Pitch me. I could switch, but it would help a great deal to understand more about why. I'm open to change, but not eager to change.

[–] Jumuta@sh.itjust.works -1 points 9 hours ago

purple 🟣

[–] QuazarOmega@lemy.lol -1 points 11 hours ago

Rust 🦀🦀🦀

[–] grrgyle@slrpnk.net 1 points 14 hours ago (1 children)

How do you like it? I tried it a few years ago, but my vim muscular memory made it feel as uncomfortable as learning vim for the first time.

[–] jbrains@sh.itjust.works 2 points 14 hours ago

I'm very happy. I had the same early experience as you, but I kept with it. I've been using it several years now. When I'm forced back to vim, my fingers remember just enough, but I have to undo pretty often.