Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.