this post was submitted on 27 Dec 2023
152 points (75.3% liked)

linuxmemes

21575 readers
686 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 members of the community for any reason.
  • 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.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 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, and wants to interject for a moment. You can stop now.
  •  

    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 fork-bomb your computer.

    founded 2 years ago
    MODERATORS
    152
    :wq! (lemmy.world)
    submitted 11 months ago by Waffelson to c/linuxmemes
     
    you are viewing a single comment's thread
    view the rest of the comments
    [–] [email protected] 29 points 11 months ago (3 children)

    I always get annoyed when I'm on some system and nano pops up and I need to figure out how to kill that thing.

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

    Nano literally tells you all the shortcuts to your face.

    [–] mvirts 7 points 11 months ago

    Same. As a vim user I now can't quit nano.

    [–] [email protected] 5 points 11 months ago (3 children)

    Very intuitive - Ctrl + X... unlike vim.

    [–] voidMainVoid 12 points 11 months ago (3 children)

    Why is Ctrl-X intuitive? Shouldn't it be Ctrl-Q (for "quit")?

    [–] mihnt 5 points 11 months ago (2 children)
    [–] voidMainVoid 9 points 11 months ago (2 children)

    In most apps, Ctrl-X means "cut", not "quit". Especially when it's a freakin' text editor!

    I will grant you that it's more intuitive than vi, but that is a very, very low bar.

    [–] GoosLife 3 points 11 months ago

    Ctrl-X in Nano is arguably more nonsensical, considering that vi was made in an era long (decades) before many of the conventions we know today came about. They were figuring it out in real time. And the criterium here is much simpler: it must be available on all keyboards so no fancy keys. That's all.

    On the other hand, when nano decided to use Ctrl+X for eXit, Apples Ctrl+X/C/V had already been brought over to Windows and Apple, and was also the de facto way for most Linux apps to handle these inputs although I do think it came before any "official" efforts to standardize these shortcuts in desktop environments.

    [–] [email protected] -3 points 11 months ago* (last edited 11 months ago)

    It doesn't have to be X, just the fact that it uses modifier keys is enough. It could be Q or anything else, just please, for the love of god, we live in the 21st century now, all keyboards have modifier keys, please, add modifier keys shortcuts as well.

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

    And it's also an X, like any GUI app in any OS.

    [–] Reddfugee42 5 points 11 months ago (1 children)

    I know I always try GUI methods in console

    [–] [email protected] -2 points 11 months ago* (last edited 11 months ago)

    That's normal for people that didn't grow up in the 70s and 80s and GUI wasn't the first thing they knew. I was a teen in the late 90s and early 00s, so yeah, we had GUIs for almost everything.

    We're basically trying to do catchup with the cool kids, but let's face it, they live somewhat in the past regarding modifier keys and vi/vim.

    [–] UnfortunateShort 4 points 11 months ago (2 children)

    Because it also sends the kill signal in every terminal I've witnessed yet... And you have it right on screen the second you start Nano.

    [–] mvirts 12 points 11 months ago (1 children)

    I'm over here using Ctrl c all over the place to kill stuff...

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

    Yeah, you could use that as well.

    [–] GoosLife 5 points 11 months ago (1 children)

    Can you please elaborate on the first part? It is not standard Linux terminal behavior to send the KILL signal on Ctrl+X.

    [–] UnfortunateShort 1 points 11 months ago

    Actually, you are right. I will stand by my point that Nano tells you what to press, but I wonder where I got the stuff about Ctrl+X... I am very positive that I have used it at some point (outside of Nano), but maybe my brain is playing tricks on me 🤔

    [–] [email protected] 2 points 11 months ago* (last edited 11 months ago)

    Because nano just shows how to exit, as well as some other basic functions at bottom

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

    I'm not planning on googling that 😒.

    [–] dipshit 5 points 11 months ago* (last edited 11 months ago) (1 children)

    result: Very intuitive like vim.

    1. gg - top of the file
    2. /un - find “un” place cursor at u
    3. 2x - remove 2 characters
    4. ?- - search backwards for the character -
    5. d/like - delete everything up until the characters like

    See, intuitive!

    [–] [email protected] 0 points 11 months ago* (last edited 11 months ago) (2 children)

    I don't do that much search and replace in any terminal based text editor to actually use that on a regular basis. If I need edits like that, I use a GUI text editor.

    [–] dipshit 2 points 11 months ago

    Sure, I just hate moving from mouse to keyboard every few seconds as I code.

    [–] Moshpirit 1 points 11 months ago (1 children)

    Why not just using Micro? Ctrl + Q. Intuitive af

    [–] [email protected] 1 points 11 months ago* (last edited 11 months ago)

    Yeah, sure, that works as well.

    As long as I get to use modifier keys, almost anything is fine with me. We don't live in the 70s, that was 50 years ago. If backwards compatibility is what they're after, I'm sorry but I think they overdid it. Plus, you can just add them, the defaults don't need to be changed.