this post was submitted on 25 Dec 2023
655 points (99.7% liked)

196

16508 readers
2262 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
 

First time when you ssh into your Linux terminal and you gotta “sudo crontab -e” or something and it’s like “what editor do you want to use?” and nano sounds lame so you choose vim cause the sound is cool when you say it and then you have to wipe the whole comp and start over

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 13 points 10 months ago (3 children)

How to use Vim: 1- Don't use it. 2- Use Nano or Gedit lmao.

[–] [email protected] 10 points 10 months ago (1 children)

Until those are not available.

This is a pisspoor attitude to have, just fire up vimtutor and you will know how to use it in no time.

[–] [email protected] 7 points 10 months ago (3 children)

Unless you're a sysadmin who deals with very obscure systems, you'll always have access to nano, so why bother?

Vim elitists love to brag about how cool Vim is, but pretty much never properly elaborate. Why should I learn all those obscure commands to just edit some text? What's the point?

[–] [email protected] 7 points 10 months ago (1 children)

it feels smooth
the movement is very fast and precise
you don't need to move your hand for arrow keys so it's nice when you're lazy
i dont use vim anymore though, i use helix because it's purple

[–] [email protected] 3 points 10 months ago
[–] [email protected] 3 points 10 months ago (2 children)

Even not being a vim wizard, editing code without vim keybindings feels... slow.

Yeah, I could grab the mouse, highlight everything between the arguments to a function and hit delete. Or I could just go to the open paren and just hit d%. I could grab the mouse, highlight the line and hit delete, or I could literally just type dd.

And trying to edit things in nano is positively masochistic.

[–] [email protected] 1 points 10 months ago (1 children)

Why would someone edit the actual code (not configs) from the terminal? That by itself sounds like a masochistic endeavor. But I might be missing something.

[–] [email protected] 2 points 10 months ago* (last edited 10 months ago) (1 children)

I used to do it more back in college where I'd ssh into the schools computers to work on assignments. It's still sometimes useful if you're in the console and want to edit something quickly.

However, there's e.g. macvim and gvim which are literally just vim in a gui; they give you menus and the ability to drag panes and click to move your cursor. With a decent LSP setup they can actually be pretty nice.

And most other decent editors have vim emulation of various quality levels. Emacs is a bit buggy, but it's really useful if you want to code in agda or clojure. And VS Code has fairly decent vim emulation.

[–] [email protected] 1 points 10 months ago

I see, thank you for clarification!

[–] [email protected] 3 points 10 months ago

I learned them and basically never use vim.

I use sed if i need to change things with a pattern, cat the file if i need to see the contents, use head or tail if its too much to fit on the screen.

If I am writing code, I use a code editor. Emacs and vim can do a lot, but they can also fuck off.

[–] [email protected] 2 points 10 months ago

Why, just use notepad, they're just text editors.

[–] [email protected] 1 points 10 months ago

genuinely a skill issue