R.NF
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
Waffelson@lemmy.world to linuxmemes@lemmy.world · 1 year ago

:wq!

lemmy.world

message-square
116
link
fedilink
153

:wq!

lemmy.world

Waffelson@lemmy.world to linuxmemes@lemmy.world · 1 year ago
message-square
116
link
fedilink
  • 👍Maximum Derek👍@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    21
    arrow-down
    2
    ·
    1 year ago

    :ggdGwq (please don’t do this)

    • JustinAngel@lemmy.world
      link
      fedilink
      arrow-up
      15
      arrow-down
      1
      ·
      1 year ago

      VIM Golf… Same outcome, fewer strokes:

      %d|wq

      • itslilith@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        1 year ago

        you can replace wq with x

        :%d|x

        • 0x4E4F@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          5
          ·
          1 year ago

          Only in Vim, not in Vi.

    • meow@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      11
      ·
      1 year ago

      E492: Not an editor command: ggdGwq

    • Ignotum@lemmy.world
      link
      fedilink
      arrow-up
      11
      ·
      1 year ago

      I use Vim daily, and i have absolutely no clue what that command would do, what would it do? Delete the document, save and quit?

      • filiberto_kunstlinger@lemmy.world
        link
        fedilink
        arrow-up
        15
        ·
        edit-2
        1 year ago

        exactly.

        gg -> go to top of document

        d -> delete (actually, it’s cut, but it destroys the mnemonic)

        G -> here is a modifier to “d” and tells it do “delete until end of document”

        w -> write current state of buffer to disk

        q -> exit program

        • meow@lemmy.blahaj.zone
          link
          fedilink
          arrow-up
          17
          ·
          1 year ago

          Actually not, binds and commands aren’t the same. ggdG only works as a series of inputs, while wq only works as a command (with the colon).

          • Victor@lemmy.world
            link
            fedilink
            arrow-up
            8
            ·
            1 year ago

            Exactly. The colon needs to be just before the w, not at the front of the sequence…

            • CaptainBlagbird@lemmy.world
              link
              fedilink
              arrow-up
              6
              ·
              1 year ago

              And while you’re at it, throw an ESC in there at the beginning, will ya?

              • Victor@lemmy.world
                link
                fedilink
                arrow-up
                2
                ·
                1 year ago

                If you want to cover every case (mode), indeed. 😊

          • 👍Maximum Derek👍@discuss.tchncs.de
            link
            fedilink
            English
            arrow-up
            3
            ·
            1 year ago

            yeah, I screwed it up

        • surewhynotlem@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          1 year ago

          gg

          Huh… I always just used :1

    • i_am_tired_boss@lemmy.world
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      ggdGZZ

      This actually does what you intend to do. On nvim atleast.

linuxmemes@lemmy.world

linuxmemes@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: [email protected]

Hint: :q!


Sister communities:
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
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, no politics, no trolling or ragebaiting.
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 figures

We 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.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 1 user / day
  • 1 user / week
  • 2.03K users / month
  • 17.3K users / 6 months
  • 9 local subscribers
  • 24.4K subscribers
  • 1.53K Posts
  • 78.4K Comments
  • Modlog
  • mods:
  • Kevin@lemmy.world
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org