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 trialJin Jie Seah
2,492 PointsHow to run console without typing the file name again and again
How do i run my script in console without typing out the file name all over again as i saw it was done by the tutor. It seems that she could just copy and paste the file name and run the script.
4 Answers
Les Woods
2,581 PointsHi Jin, you can just press up when you've got the console selected to cycle through your previous entries.
Micah Doulos
17,663 PointsI recommend diving into an external tool you'll be using professionally. It will take some work to set up, but try setting up a text editor on your computer. A development environment. This will be useful to you as you learn to write code in the context you'll actually be writing code outside of Treehouse courses.
I personally use Atom Text Editor. With Atom, you can install the package Atom-live-server, which will automatically display the results of your code to a webpage in the browser, every time you save a file, ie cmd or ctrl s. With dev tools (console) open in the browser. Seeing updated results is as simple as changing your code, and hitting the hotkey cmd + s on the mac, and ctrl + s on windows.
David Bilson
13,819 PointsAnother editor that appears to be in favour at the moment is Visual Studio Code provided for FREE by Microsoft.
https://code.visualstudio.com/
Visual Studio Code Documentation and setup videos: https://code.visualstudio.com/docs
Daniel Brown
16,908 PointsSelect the console and push the 'up key' on your keyboard, then hit enter. This will automatically select the previously entered command.
David Bilson
13,819 PointsDavid Bilson
13,819 PointsWhen using Workspaces i use the up and down arrows as suggested by Les Woods, but i use the command clear to clear the console every now and then when it gets crowded.