• 2910000@lemmy.world
    link
    fedilink
    arrow-up
    7
    ·
    9 hours ago

    Works as long as you didn’t put something silly in your nvim config like

    vim.keymap.set("ca", "q!", "echo 'not so fast!'")
    
  • Ganbat@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    18
    ·
    edit-2
    13 hours ago

    vim something.log
    esc
    quit
    exit
    ctrl+x
    ctrl+q
    shushejehojwhatiwibaln):gufht;vfgs+_&f
    reboot
    nano something.log

  • hamsda@feddit.org
    link
    fedilink
    arrow-up
    20
    ·
    17 hours ago

    Thank you very much. I sent this to my coworker who expressed interest in switching to vim :)

    • Warl0k3@lemmy.world
      link
      fedilink
      arrow-up
      54
      ·
      18 hours ago

      On US ones as well, I think they just put the relevant key-symbols and excluded the combination press as they can be assumed.

      • Victor@lemmy.world
        link
        fedilink
        arrow-up
        9
        ·
        17 hours ago

        I have a custom keyboard with a QMK firmware. I enabled something called auto shift. It’s the best. Just hold down the key you want shifted, and it auto shifts. I settled for enabling this for capital letters and symbols. So comfortable not to have to press the shift key.

        • BassTurd@lemmy.world
          link
          fedilink
          arrow-up
          21
          ·
          17 hours ago

          So you hold down the first letter of each sentence longer so that it capitalizes rather than hold shift? That feels like it would completely mess with my flow when typing. Shift just happens naturally for me and I don’t register I’m pushing it.

          • Victor@lemmy.world
            link
            fedilink
            arrow-up
            6
            ·
            16 hours ago

            Exactly like that, yes. Or 1 for exclamation point, or 2 for @. Just like on a phone keyboard, with tap and hold for symbols and numbers and such.

            I’ve had this keyboard for a few months now and I didn’t enable it exactly for the reasons you mention.

            I enabled it a few weeks ago now just to try it, and wow, I though I didn’t notice myself pressing the shift key, that it “came naturally”. Boy was I wrong. Now whenever I have to use the shift key it feels so cumbersome lol. Typing has become so comfortable now.

            I use a ZSA Voyager for reference.

              • Victor@lemmy.world
                link
                fedilink
                arrow-up
                3
                ·
                edit-2
                3 hours ago

                I spam the key. But that is such an extremely rare case that it’s worth the trade-off. The firmware also does allow you to add a key to toggle auto shifting on and off, so I could just add that if I want, but I don’t see the need.

                If I need to repeat a character many times in a text editor, I’d just use the features of the editor to do so. Helix or Neovim has you covered for repeating characters thousands of times and copying it to the clipboard with a handful of keystrokes if you wish. But what an edge case though.

                For double letters, I just double tap like you would normally when typing. 👍

                • NeatNit@discuss.tchncs.de
                  link
                  fedilink
                  arrow-up
                  0
                  ·
                  12 hours ago

                  Does this break games? Where in the input pipeline is the long press converted to shift? Being in the firmware implies that it’s in the keyboard itself, so even games wouldn’t be able to see that you’re just holding W to go forwards.

    • Zagorath@aussie.zone
      link
      fedilink
      English
      arrow-up
      3
      ·
      17 hours ago

      Same on Dvorak.

      Though the custom coder’s Dvorak I use while programming has a dedicated ! key. Shift still needed for : though.

    • lime!@feddit.nu
      link
      fedilink
      arrow-up
      6
      ·
      edit-2
      15 hours ago

      four. the ! is unnecessary. how many actions are there to save and quit in other editors? ctrl, s, ctrl, w is four. move to file, click, move to save, click, move to ×, click is six.

      and that’s before we replace the wq with x.

      • psud@aussie.zone
        link
        fedilink
        English
        arrow-up
        3
        ·
        14 hours ago

        If we count the modifier keys:

        Vim: esc, shift+:, w, q, Enter

        Emacs: ctrl-s, crtl+x ctrl+c, or use the menu options

        I use both, but find Emacs much quicker, though vim is easier to learn, though Emacs is easier while you’re learning

        • lime!@feddit.nu
          link
          fedilink
          arrow-up
          2
          ·
          14 hours ago

          i’ve never had the time to get into emacs, would love to though.

          also, some layouts have the : on its own key, and if you include the esc in vim commands you’re not using vim correctly :)

          • psud@aussie.zone
            link
            fedilink
            English
            arrow-up
            2
            ·
            13 hours ago

            ESC

            Surely you’re editing right before exiting, why else would you be saving?

            • lime!@feddit.nu
              link
              fedilink
              arrow-up
              1
              ·
              13 hours ago

              not necessarily. you could also have done a yank-paste, or a repeated action, or had a command output into the buffer.

              it’s a good habit to always leave the editor in normal mode between actions, because that makes for a cleaner edit history with smaller changesets in the undo tree.

              …vim is sort of like driving stick in that way.

              • psud@aussie.zone
                link
                fedilink
                English
                arrow-up
                1
                ·
                9 hours ago

                Yeah, having used both, my preference is for Emacs, which also comes with the bonus of menu driven ways of doing most things when you’ve been away long enough to have forgotten a keyboard shortcut. I have always needed a cheat sheet handy when away from vim for a few months

                • lime!@feddit.nu
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  4 hours ago

                  i’ve moved to helix, partly to stop myself tinkering and partly because the reversed command model is just easier. plus it has popup helpers.

    • villainy@lemmy.world
      link
      fedilink
      arrow-up
      7
      ·
      16 hours ago

      Or 3. Hold shift, press ZZ to save and quit ZQ to quit without saving.

      5. Writing and quitting

        					ZZ
      

      ZZ Write current file, if modified, and close the current window (same as “:x”). If there are several windows for the current file, only the current window is closed.

        					ZQ
      

      ZQ Quit without checking for changes (same as “:q!”).

      • ryper@lemmy.ca
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 hours ago

        Since people don’t seem to realize that vim has a help system: You can get to this information with :help quit or :help exit

    • somerandomperson@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      14 hours ago

      the annoying thing about trq is that us is the default everywhere, so you can’t press [İ] to type “i”, it’ll type a " ’ " instead >:(

      similar things for “:” and “-”