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 2021 (Beginner + Advanced)
JavaScript - The Complete Guide 2021 (Beginner + Advanced)
64,026 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)
284,472 students enrolled
40 hours of video content
View Course
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
Vue - The Complete Guide (w/ Router, Vuex, Composition API)
152,857 students enrolled
48.5 hours of video content
View Course