-3

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?

2
  • 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. Jan 15, 2013 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, 2013 at 10:41

2 Answers 2

1

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

1

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.)

You must log in to answer this question.

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