by Sai gowtham

How to save and exit Vim editor

Learn, how to save your changes and exit the vim editor.

Saving and exit

To save the changes and exit the vim, press the Esc key then type :wq command.

Where w means write to the file and q is quit.

Exit without saving

To exit the vim without saving the changes, press the Esc key then type :q! command.

Saving the file

To save the file without exiting the vim, press the Esc key then type :w command.

Top Udemy Courses

JavaScript - The Complete Guide 2020 (Beginner + Advanced)
JavaScript - The Complete Guide 2020 (Beginner + Advanced)
26,545 students enrolled
52 hours of video content
View Course
React - The Complete Guide (incl Hooks, React Router, Redux)
React - The Complete Guide (incl Hooks, React Router, Redux)
221,520 students enrolled
44 hours of video content
View Course
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
Vue JS 2 - The Complete Guide (incl. Vue Router & Vuex)
114,575 students enrolled
21 hours of video content
View Course