Вопрос

I tried creating a new js file from the mac terminal (i.e., mate sample.js) but got the below error:

-bash: mate: command not found

I'm not sure how to create a new file directly from the Terminal. Can anyone help me out?

Это было полезно?

Решение 2

You are trying to create and open a file with TextMate. For that to work, you have to meet two conditions:

  1. Having TextMate installed
  2. Having TextMate's command-line tool (mate) installed (in TM 2.0, you can do that from Preferences > Terminal tab)

Другие советы

touch someFile.js

or

vim someFile.js

or

nano someFile.js

or

cp someOtherFIle.js someFile.js

EDIT:

Vim commands help:

http://www.tuxfiles.org/linuxhelp/vimcheat.html

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top