Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exit the insert screen in mac terminal

Tags:

git

terminal

vim

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?

like image 277
kavin Rakshan Avatar asked Nov 30 '16 18:11

kavin Rakshan


2 Answers

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

like image 112
prabodhprakash Avatar answered Sep 28 '22 09:09

prabodhprakash


Steps:

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

Your text has been saved :)

like image 35
Alireza Tahriri Avatar answered Sep 28 '22 09:09

Alireza Tahriri