this post was submitted on 03 Sep 2023
730 points (93.0% liked)

linuxmemes

23392 readers
418 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
     
    top 50 comments
    sorted by: hot top controversial new old
    [–] FinalBoy1975@lemmy.world 39 points 2 years ago (5 children)

    I actually learned how to use vi like 30 years ago and I had all the commands memorized. Then, nano came along. All the commands are at the bottom of the screen to remind you. It was just too tempting to pass up. However, I can't help but suspect that somewhere out there I might have left a vi session open because maybe I mistyped. I might have accidentally typed ;q! instead of :q! or something.

    [–] ChapolinColoradoNZ@lemmy.world 9 points 2 years ago (1 children)

    I get stressed out every time I need to jump into a server and check something and the only editor is vi. If I can I install nano straight away. Btw, :q! does nothing without pressing ESC first! Hehehe

    [–] FinalBoy1975@lemmy.world 7 points 2 years ago

    Yeah, that's part of the joke. I probably didn't press ESC first. LOL

    [–] TheInsane42@lemmy.world 8 points 2 years ago (1 children)

    I'm feeling old now... I've been using vi for 35y now and was happy when I got vi.exe on a dos box, as I hated edit. I still don't like 'simple' editors like nano/joe.

    I used kill to get out of emacs when trying it agter 7y of vi usage, so I get the need to get mideval on editors users aren't used off. ;)

    [–] FinalBoy1975@lemmy.world 8 points 2 years ago (1 children)

    vi has always been my bane because I'm a sloppy typist. I can't count the number of files i had to fix because they ended with :q i like nano because the commands are ctrl + whatever. i don't make a mess.

    load more comments (1 replies)
    load more comments (3 replies)
    [–] nickwitha_k@lemmy.sdf.org 33 points 2 years ago (1 children)

    You can :q! any time you want, but you can never leave.

    [–] backhdlp@lemmy.blahaj.zone 6 points 2 years ago

    Insert Mode tho

    [–] gonzo0815@sh.itjust.works 28 points 2 years ago

    It's really easy, just unplug your computer.

    [–] glibg10b@lemmy.ml 24 points 2 years ago* (last edited 2 years ago)
      • Esc Γ— 2
      • CTRL-[ Γ— 2
      • CTRL-\ CTRL-N Γ— 2
      • :q
      • :qa
      • :wq
      • :wq!
      • :wqa
      • :x
      • ZZ
      • :q!
      • ZQ
      • :q!
      • :cq
    [–] nebula42@lemmy.world 20 points 2 years ago (1 children)

    It's the hotel California of text editors >:)

    load more comments (1 replies)
    [–] GreenMario@lemm.ee 16 points 2 years ago (2 children)

    Nano is pretty good if you're in a terminal. Used to use vim for ssh related stuff but since nano added syntax highlights I didn't go back.

    [–] glibg10b@lemmy.ml 6 points 2 years ago* (last edited 2 years ago) (7 children)

    Nano's only appeal is that it's beginner-friendly, but you already know Vim, so why switch?

    [–] asuka@sh.itjust.works 4 points 2 years ago (1 children)

    Because Nano just works. Vim is insane affront to good design and standards.

    load more comments (1 replies)
    load more comments (6 replies)
    [–] dustyData@lemmy.world 3 points 2 years ago

    Micro exists. It's Nano with Lua plugins. Very robust and minimalist. No magic incantations. I actually use it to code simple stuff that I just don't want to wait a minute for VSCode to spin its wheels.

    [–] Lolen10@lemmy.fmhy.net 14 points 2 years ago (2 children)

    I know how to get out. But I still like nano a lot more.

    [–] 31337@sh.itjust.works 2 points 2 years ago (2 children)

    WTF. Why? I could maybe see someone preferring emacs over vim, but not nano. Maybe there are nano features I don't know about, but it just seems like Windows Notepad to me.

    I normally just use VS Code with a VIM extension. Unless I'm ssh-ing into something, then I use vim.

    [–] gamey@feddit.rocks 5 points 2 years ago

    Well, you kind of got it but also didn't I guess. If I want to quickly edit a none critial config file or similar a terminal version of Notepad is perfectly fine and for more complex stuff I prefer a GUI anyway.

    [–] dustyData@lemmy.world 4 points 2 years ago

    I edit in Micro. Which is Nano with Lua plugins. Come at me.

    load more comments (1 replies)
    [–] redempt@lemmy.world 13 points 2 years ago (1 children)
    load more comments (1 replies)
    [–] PeterPoopshit@lemmy.world 12 points 2 years ago

    You exit vim by unplugging the pc.

    [–] glad_cat@lemmy.sdf.org 11 points 2 years ago (1 children)

    That's how you learn Linux and Google: how to kill vim? kill -9 vim.

    [–] glibg10b@lemmy.ml 3 points 2 years ago

    "vim" isn't a valid PID. I think you meant killall -9 vim

    [–] eggymachus@sh.itjust.works 10 points 2 years ago

    Now do ed...

    [–] JerkyChew@lemmy.one 9 points 2 years ago

    Pssh, come on, it's just :q or :q! - couldn't be simpler or more intuitive!

    [–] Araozu@lemmy.world 9 points 2 years ago (2 children)

    My main problem with vim is that they use hjkl instead of jkl; , it doesn't make sense to me why they'd do that.

    And my second problem is that I use my own custom keyboard layout instead of qwerty, so I'd have to remap all the keys. Why spend hours learning and then rebinding all the keys when I can instead play some Dota? /s

    [–] Asymptote@lemmy.dbzer0.com 3 points 2 years ago (1 children)

    My main problem with vim is that they use hjkl instead of jkl; , it doesn't make sense to me why they'd do that.

    With qwerty you can be sure of layout of the letters and numbers across languages.

    load more comments (1 replies)
    [–] evranch@lemmy.ca 3 points 2 years ago* (last edited 2 years ago) (2 children)

    Been a vim user for decades but never used hjkl. Probably strongly correlated with the fact I'm non QWERTY as well (Dvorak). I just use the arrow keys combined with the jumps to start/end of lines/words or to characters.

    You don't need to remap anything aside from hjkl as the keybindings are mostly mnemonic and not location based.

    On Dvorak at least, ^C is so easy to press that it's great for switching modes, I never use Esc.

    I find the more time you've spent in non-graphical shells, especially on low spec devices or laggy connections, the more you appreciate vim. Instead of pressing Del a bunch of times and having it overrun you can ct" to swap out that string. I even use vim keys in vscode, as my hands are so used to them.

    My biggest complaint is logging into some legacy device that only has vi and not vim, when shortcuts like "dap" or "caw" don't work

    load more comments (2 replies)
    [–] eslaf@lemmy.world 8 points 2 years ago

    :q does the trick

    [–] Kentronix@lemmy.world 7 points 2 years ago
    [–] velovix@hedge.town 7 points 2 years ago (1 children)

    I took the vim pill a few years ago and spent tons of time learning its shortcuts, trying out plugins, and forming strong opinions about my relationship with my text editor. It's a great tool, but I personally lost the plot somewhere down the line. I'm not sure that passion actually served me.

    load more comments (1 replies)
    [–] 018118055@sopuli.xyz 5 points 2 years ago

    !killall vim

    [–] dipshit@lemmy.world 3 points 2 years ago (4 children)
    load more comments (4 replies)
    [–] Kaelygon@lemmy.world 3 points 2 years ago (2 children)

    Remember to actually kill the process though, since that will only background/suspend it in most cases.

    (Be sure to save the file though first, Vim creates a "swap" / recovery file but its best to not rely on that, use fg to re-open, then press escape and type :wq)

    [–] glibg10b@lemmy.ml 3 points 2 years ago* (last edited 2 years ago)

    Followed by kill -9 %1 to actually kill the process, otherwise your terminal might complain or freeze up when you try to close it

    [–] Limit@lemm.ee 3 points 2 years ago
    load more comments
    view more: next β€Ί