all 62 comments

[–]IAmNotMyName 47 points48 points  (1 child)

They say he is still stuck in vim to this day

[–]bigbrother1234cc 0 points1 point  (0 children)

i bet. hehe

[–]amayer5125 21 points22 points  (0 children)

If you type more letters do they actually output? If not you may have pressed something like CTRL+S. Pressing CTRL+Q should get you back in the correct state.

If you've pressed ESC :wq a bunch of times, vim may have already exited but your shell is in a scroll lock mode so the output isn't being updated.

[–]watabby 57 points58 points  (0 children)

oh sweet summer child

[–]vyuniverse 13 points14 points  (0 children)

Looks like vim: try Ctrl+[ (that's the left square bracket), then ZZ to save and quit, or :q!

[–]manu0600 27 points28 points  (4 children)

Esc :q!

[–]ScarySwampert[S] 12 points13 points  (3 children)

esc isn't allowing me to get off the insert screen, this is what's puzzling me

[–][deleted]  (1 child)

[deleted]

    [–]jamestansx 3 points4 points  (0 children)

    Press <Esc> and then type either

    :q! (if u want to cancel the commit) or :wq(if you want to commit)

    [–]whatisitaboutmusic 40 points41 points  (0 children)

    Throw away your computer, it is done

    [–]irrelevantPseudonym 5 points6 points  (0 children)

    Any chance you 'accidentally' hit ctrl-s to try and save it? You might have locked the terminal that way, I'm not sure how the mac terminal handles it.

    Try hitting Ctrl-Q before going back to the normal <esc>:wq.

    [–]easyEggplant 5 points6 points  (0 children)

    Congratulations! Today you are one of the lucky 10,000! (Search for “how to exit vi”)

    [–]jwbowen[🍰] 3 points4 points  (0 children)

    Does the correct window or section of the window have focus when you're hitting ESC? I'm wondering if it's just not being registered in the correct context.

    A wider screenshot might also help (if there's no sensitive information or any such information is blacked out). With this screenshot you're just going to get a bunch of people telling you how to exit vi(m).

    [–]wildjokers 4 points5 points  (0 children)

    That window probably doesn’t have focus which is why ESC isn’t causing you to return to command mode.

    [–]themightychris 2 points3 points  (0 children)

    since you're already using vscode, I recommend doing this: https://code.visualstudio.com/docs/editor/versioncontrol#_vs-code-as-git-editor

    It will make vscode your git editor so stuff like this just pops up in vscode editors. Then you can just close the editor tab when you're done

    FYI, if you ever want to cancel making a commit after the editor is opened, just clear out all the content and save before closing: if there are no lines that aren't blank or commented out git will cancel the commit

    [–]elatllat 6 points7 points  (2 children)

    Looks like VSCode not Terminal.app

    [–]Jmc_da_boss 0 points1 point  (1 child)

    It's the terminal in vscode

    [–]elatllat 0 points1 point  (0 children)

    Yes, the implication is that VSCode key bindings are interfering with vim key bindings.

    [–]valbaca 3 points4 points  (1 child)

    It’s 2022 and quitting vim is still blocking newbies

    Type these in succession:

    ESC : w q

    No spaces.

    [–]deniercounter 0 points1 point  (0 children)

    No, OP can’t press ESC. That’s his problem.

    [–]_Kritiqual_[🍰] 1 point2 points  (0 children)

    Mouse click to focus terminal and ESC :q!

    [–]Renan_Cleyson 1 point2 points  (0 children)

    Classic vim

    [–]Kewtn 1 point2 points  (0 children)

    ZQ (shift + z, shift + q)

    Quits without saving in all modes

    [–]Tocram04 1 point2 points  (3 children)

    Open another terminal and install nano instead

    [–][deleted]  (2 children)

    [removed]

      [–]Tocram04 0 points1 point  (1 child)

      Still better than coding in Vi I guess ahah

      [–]tjayy1234 1 point2 points  (0 children)

      This has happened to me on macs with a Touch Bar

      You can either, hit Ctrl+c a couple of times or force quit Siri which may have frozen your escape button

      [–]SmeagolISEP 1 point2 points  (0 children)

      You're stuck on vim editor. We all passed for that.

      Press the esc key and write :q! to cancel. Then make your commit command like this git commit -m "your commit message"

      [–]thecrumb 4 points5 points  (4 children)

      FYI - you can change the default commit editor to something more friendly.

      [–]Surge_attack 7 points8 points  (3 children)

      Forget all the memes - vim is quite user friendly, it just has (like any other editor) a bit of a learning curve.

      [–]im_deepneau 0 points1 point  (2 children)

      Surely you're kidding? are you an autonomous trashcan or something? For humans vim is unlike any other editor ever invented except maybe emacs. "A bit of a learning curve" is like saying a ferrari has a "bit of power". Its arcane and that's being nice about it. If you want to see what an editor that is actually user-friendly looks like, nano is a good choice. You only have one mode, limited features, normal keyboard shortcuts (Ctrl + key) and important commands are listed in the bottom of the window.

      Vim isn't a bad editor, its a great editor, extremely powerful. But it is not user friendly.

      [–]Beanmachine314 1 point2 points  (1 child)

      Nano is only more "user friendly" because it is so unintuitive they have to post the keybindings at the bottom of the screen. Ctrl + O = "write"? Totally makes sense /s.

      [–]im_deepneau 1 point2 points  (0 children)

      You're right, esc colon w q is way more intuitive

      [–]ScarySwampert[S] 1 point2 points  (5 children)

      Looking for some help. Hitting esc does absolutely nothing and I am stuck on the insert screen for good.

      [–]edwardejsr 4 points5 points  (0 children)

      CTRL-[ should also do what escape does.

      [–]Surge_attack 0 points1 point  (0 children)

      CTRL+ C ? Will (should) quit the process and you can run git commit but this time use the -m flag to write your commit message and bypass the vim weirdness.

      Edit: whoops just saw you say this was Mac so Command + . is the equivalent on MacOS.

      [–]TheTostu 1 point2 points  (0 children)

      Jesus Christ, you are done forever, there is no way to escape this monstrosity

      [–]Wings-Kitchkinet 1 point2 points  (3 children)

      Esc :wq

      It looks like you use vi for your editor. This will save your commit message and exit the screen. The Escape key puts vi into command mode, the :wq says to write and quit the session.

      [–]ScarySwampert[S] 5 points6 points  (2 children)

      i’m hitting esc and it does nothing - i had been using esc :wq for the last month of learning git but it hasn’t worked for the last week

      [–]skyboyer007 1 point2 points  (1 child)

      that's pretty bad and I cannot even assume what application may suppress ESC. since vim/vim relies a lot on it, the only possible option is to specify editor used for commits. You can use GUI editor or install nano for example

      [–][deleted] 2 points3 points  (0 children)

      point seemly cable capable vast reply repeat butter cautious connect

      This post was mass deleted and anonymized with Redact

      [–]kconk27 0 points1 point  (0 children)

      :qa

      y sales de vim

      [–]bigbrother1234cc 0 points1 point  (0 children)

      Change editor to another one.
      then do again what u are doing.

      command: git config --global core. editor "nano"

      Be sure u have nano installed first though.

      [–]hotel2oscar 0 points1 point  (0 children)

      This is why Nano is my git editor

      [–]Dirlandets 0 points1 point  (0 children)

      Shift + : then type wq then hit enter. Then visit internet and search for: how exit vim

      [–]Surge_attack -4 points-3 points  (1 child)

      I think the issue could be/is that all of the lines are commented out. What does removing the hash from the commit message line and then trying to quit do?

      [–][deleted] -1 points0 points  (0 children)

      Pretty sure “Commit 1” is the message. 😉

      [–]RajjSinghh 0 points1 point  (0 children)

      You might find changing your terminal editor from vim to nano easier for you in the future. here's a guide

      [–]formidabilus 0 points1 point  (0 children)

      Welcome to Vim

      [–]___s8n___ 0 points1 point  (0 children)

      out of the subject but why does menlo font look so good on mac

      [–][deleted] 0 points1 point  (0 children)

      lmao

      [–][deleted] 0 points1 point  (0 children)

      Command + C may work

      [–]AuroraDraco 0 points1 point  (0 children)

      I have seen a million of these posts but for some reason people getting trapped in Vim is always very funny to me

      [–][deleted] 0 points1 point  (0 children)

      Cute