561
submitted 1 month ago* (last edited 1 month ago) by moonleay@feddit.org to c/programmer_humor@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] sorter_plainview@lemmy.today 13 points 1 month ago

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

[-] grrgyle@slrpnk.net 25 points 1 month ago

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 2 points 1 month ago

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

[-] akkajdh999@programming.dev 14 points 1 month ago

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

[-] TechieDamien@lemmy.ml 6 points 1 month ago

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

[-] Simmy@lemmygrad.ml 1 points 1 month ago

But why learn all that? Nano user here.

[-] TechieDamien@lemmy.ml 2 points 1 month ago

Depends how much time you spend in a text editor. If it is just for a few config edits and stuff, honestly there is little reason to learn. The real benefit is if you spend a lot of time editing text due to the time saved using more powerful commands. There is the additional benefit that vi/vim is installed on practically any Linux box, so you will almost always have a familiar editor to hand in an unfamiliar environment.

[-] hakunawazo@lemmy.world 5 points 1 month 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).

[-] zarkanian@sh.itjust.works 4 points 1 month 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.

this post was submitted on 05 Nov 2024
561 points (97.8% liked)

Programmer Humor

19821 readers
631 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 2 years ago
MODERATORS