11
Merge branch 'develop' into peakfront

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.

"To get updated code in my branch"


-- INSERT --

I have typed this, but I cant find a way to save this and exit, so that I could work on terminal. What command am I to use here?

sudo bangbang
  • 27,127
  • 11
  • 75
  • 77
kavin Rakshan
  • 189
  • 2
  • 3
  • 7
  • 5
    Possible duplicate of [How to exit the Vim editor?](http://stackoverflow.com/questions/11828270/how-to-exit-the-vim-editor) – Scott Weldon Dec 01 '16 at 01:37

3 Answers3

38

Press esc, then colon (:) and then enter on keyboard wq to save and exit.

If you wish to just quit, without saving, write q without w

prabodhprakash
  • 3,825
  • 24
  • 48
5

Steps:

  1. Press ESC
  2. Write :w
  3. Write :q

Your text has been saved :)

2

Escape should work, but I found myself in a weird scenario recently where at times my esc key was not working for exiting insert mode. I couldn't isolate the issue, but I did stumble across the fact thatif you use option + left arrow or right arrow (like you would in order to skip through or highlight expressions in a code editor), it leaves insert mode as well.

At least on my MacBook Pro (14-inch, 2021) with an M1 on which I did not tinker with keybindings at all.

Logan
  • 21
  • 3