.

52 points

Nano ftw

permalink
report
reply
13 points

And micro for the future

permalink
report
parent
reply
2 points

I’m too used to nano, switching for micro for a while I was constantly using nano key combos and making a mess of things.

Stockholm syndrome from key combos lol

permalink
report
parent
reply
4 points

Makes sense, though you can rebind shortcuts in micro

https://github.com/zyedidia/micro/blob/master/runtime/help/keybindings.md

permalink
report
parent
reply
42 points

Vim user here. The only way to exit vim is to pray to the Vim gods and sacrifice your first born, hoping that they’ll cause a cosmic ray to hit the right spot in the memory to flip the right bit that causes it to exit. There are no alternatives.

permalink
report
reply
22 points

I usually just power-cycle the machine

permalink
report
parent
reply
-16 points

Are you guys serious? Command q. or x. or wq. or use a proper fucking terminal so you can ctrl -z and resume.

permalink
report
parent
reply
26 points

These is one of the oldest Linux memes. No, they aren’t serious. I have a hard time believing anyone here doesn’t actually know how to exit vim properly.

permalink
report
parent
reply
2 points
*

I am non-serious, I just don’t like vim (or emacs; if I’m editing a text file in a terminal I want nano, or I append manually with pipes as Linus intended).

Most of my systems have X11 and some basic GUI text editor, my server is the exception that proves the rule. There is generally no actual reason to use Vim except liking Vim, or wanting to learn to like Vim.

For those that do like Vim, or want to learn it for historical reasons? Good on you, have fun.

If you like emacs fuck off though.

permalink
report
parent
reply
31 points

easy mnemonic to quit vim: imagine you’re captain Picard in the middle of typing “:3” when Q shows up

permalink
report
reply
24 points

Or, hear me out, : because you’re doing a command, and then q for quit. Probably make it wq too, to write and quit

permalink
report
parent
reply
12 points

did you know there is a vim tutor for learning how to vim?

permalink
report
parent
reply
8 points
*

vimtutor, which I believe is installed with vim by default

Edit: My brain apparently inserted an extra word that made it seem like you were seeking said program. Leaving it though for those wondering in the future.

permalink
report
parent
reply
1 point

Yeah, but imo the best way to learn vim is to do it as you go. You only really need to know getting in and out of insert and how to write and quit. Once you’ve got that, if you wanna do something and think there’s probably a better way than moving there with the arrow keys, look it up on the Internet, remember the thing, do it a few times and you’ve learned a new thing about vim. “Surely there’s a search and replace function” yeah, is substitute with the s command. “I wanna navigate quicker within lines” use f, t and their capital versions. Combine with the quickscope plugin and you’re golden. Learn the stuff you want to use, don’t memorize commands you don’t need

permalink
report
parent
reply
8 points

Forgot

Escape first, because it wants to keep you inside the matrix and you need to tell it you are trying to escape

q!

Because you probably don’t want to save whatever you’ve accidentally done to that file trying to quit, and you have to add an exclamation point because unless you yell loudly at vim it won’t listen

permalink
report
parent
reply
7 points

No, that doesn’t make any sense. We need something convoluted so that people don’t remember it next time it’s needed.

permalink
report
parent
reply
2 points

Tell that to my history teacher…

permalink
report
parent
reply
2 points
*

That’s one too many letters. Need to use x for maximum efficiency gains.

permalink
report
parent
reply
20 points

Just because this is a vim meme, does anyone know how to copy text from one instance of vim to the other?

permalink
report
reply
12 points
*

You can yank text to system clipboard buffer ie +. Then paste (put) from the clipboard to any other vim process.

Keep in mind you should have clipboard support in your vim. If you’re on ubuntu, install vim-gtk and you should be good

permalink
report
parent
reply
1 point

I’m on Debian, but my VM is an Ubuntu server, so that should work!

permalink
report
parent
reply
10 points

Just use a single instance of Emacs to edit everything everywhere all at once. You can even use vim keybindings if you have no taste.

permalink
report
parent
reply
1 point

Emacs is more for devs though, yeah? I’m just a lowly sysadmin in training.

permalink
report
parent
reply
1 point

I think Vim is more popular with sysadmins because, historically, you could count on Vi or Vim being available on just about any server you had to do some work on, while Emacs might not be. That’s still probably somewhat true, although in the world of clouds, containers, and source-controlled, reproducible configuration, it’s probably less common to edit files in place on a server.

However, with Emacs tramp, you can edit files just about anywhere you can access, by any means, even if there is no editor installed there at all, using your local Emacs, with all your accustomed configuration. Like popping open a file inside a container running on a remote server by ssh, something I’ve done a lot of lately, debugging services running on AWS ECS.

permalink
report
parent
reply
8 points
*

Install xclip then press "+y (double-quote plus-sign y) to yank to system clipboard then "+p to put from sys clipboard

permalink
report
parent
reply
7 points

Fuck it, use neovim and copy to the system clipboard.

permalink
report
parent
reply
3 points

I think you can just use y and p

permalink
report
parent
reply
2 points

Instance of Vim? Swap buffers fool

permalink
report
parent
reply
2 points

Would this work if one of those instances was in a VM?

permalink
report
parent
reply
2 points

Copy the text to a local clipboard, then paste it into your terminal in the other instance

IDK I only use vim over ssh

permalink
report
parent
reply
20 points

I have been a vim user for more than 20 years. I tried to quit for a couple of years, but now I have just accepted my faith.

permalink
report
reply
12 points

Vim enthusiasts are just people with late stage Stockholm syndrome

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.4K

    Monthly active users

  • 1K

    Posts

  • 38K

    Comments