Super User is a question and answer site for computer enthusiasts and power users. 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

Make new folder from Vim command line in Windows gVim

In this with the mkdir command a '!' is added in front of the command.

What does the '!' actually do?

share|improve this question
This is basic, decades-old vi stuff; have you really not found any documentation?! If you're a total beginner, vimtutor.bat (comes with Vim) may introduce you to the absolute basics. – Ingo Karkat Jan 15 '13 at 9:14
Also, Vim comes with an extensive documentation. Learn to use it. In this specific case, the answer is there: :help !. – romainl Jan 15 '13 at 10:41

The ! is for entering shell commands. In this case a command (mkdir) that would normally be entered at the windows command line.

More information available on the VIM documentation site

share|improve this answer

It tells VIM to run the command through a commandset:

Vim Cookbook

"The ! command tells Vim to run the text through UNIX command."

Edit: as JGB's link mentions, not UNIX directly

However, that is not always the case. Different placements can result in different things, as you have probably seen. You can see a lot of other options in this Stack Overflow question/answer set. (things such as force, toggle, etc.)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .