Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialgavinwilson
3,355 PointsAdding new file to sublime in terminal
How did you do that where you add the new file with 'subl gulpfile.js'?
4 Answers
faraz
Courses Plus Student 21,474 PointsIf you followed the instructions here: https://gist.github.com/olivierlacan/1195304 then the command installed is sublime
and not subl
. So try running sublime .
and it should open Sublime Text in the current directory.
rtprjct
30,548 Pointsthis isn't quite the answer you're looking for, BUT you can also use the command "touch"
touch gulpfile.js
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 PointsI'm using Atom and that worked for me. Thanks!
Andrew Corcoran
20,552 PointsHi Gavin,
Take a look here for the answer: https://teamtreehouse.com/forum/create-sublime-files-from-terminal-how-did-you-do-it
The subl command should be available out of the box with Sublime Text. Just go to the folder you want to create the file in Terminal, and run:
subl newfile.js
This will open Sublime Text with a new buffer under the name newfile.js. It won't actually save the file until you save in Sublime Text (⌘ + S
or File -> Save
).
Tony Brackins
28,766 PointsHey Andrew Corcoran That actually didn't work. I'm receiving:
error: -bash: subl: command not found