Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new in VIM editor, and i want to know how to save a file after editing, i entered :x after finishing my modification, but nothing is happening !! so where should i put this command :x to be executed !

Thank you

share|improve this question
up vote 3 down vote accepted

The command for saving a Vim file is :w and Enter in the Command mode. You can get the command mode by pressing the Esc key. If you want to save and exit the file it is :wq

share|improve this answer

Press Esc before in order to enter into a normal mode, then press : to enter into a command mode, then enter your command (x in this case) and press Enter.

share|improve this answer
Thank you it works – Dady Mar 28 '13 at 9:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.