Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
Lessons:28Length:1.7 hours
Speedy workflows with atom.io
  • Overview
  • Transcript

6.3 Term2

Using the command line can be a lot more quick than messing around in editor. However, one of the drawbacks is that you have to keep switching from the command line to the editor. Fortunately, there's a package we can install that can help fix this. The name of this package is Term 2, and Term 2 just allows us to run the terminal instead of Atom. We even get key bindings where we can open up a brand new pane, or we can split a pane in multiple directions. And to install it, we just need to use apm install term2. In the command line, we'll type apm install term2. Now that it's installed, we'll go to Atom. And now, all we do is we hit Control+Alt+T, and that should open up a new terminal, but it's not. That's because we need to be aware of what context we're in. Currently we can see that we have our cursor blinking inside of index.html, if we click out of it, now hit Command+Alt+T, term2 opens up. So that's just something that's kind of tricky and that you need to be aware of when you're trying to use the key bindings. We can hit Command+W and make sure to get out. And we can hit Command+Alt+right. Now we have this opened up in another window, and this will operate just like the terminal that we're used to using. We have access to APM, so we can easily install our packages without having to go into the settings. We can easily cd and change directories, and from within those directories, we can make new folders. If we open up the underyouth/js, we can see our new build folder. And then also, we can easily create new files. We still have access to other command line utilities, such as git. So by typing git --version we pull up our current version of git. You wanna initialize a git repo for here, we can say get init. And we didn't wanna initialize get in this repo, so to fix that we can say rm-rf.git. And that's rm -rf, not rg. And that removes the git folder and all of its contents as well. So let's cd out of the JavaScript folder, and now we'll type git init again. In the tree view our git folder is initialized. You currently aren't seeing any of the color highlighting of the files, such as the green for new files and the orange for modified files. We would have to close out of the editor and open it back up to see the files change. This is something that we'd hopefully like to see fixed once Atom Editor comes out in Beta. Another way to git repository initialize, though, is we can do all the actions with git as we usually would. We can add files, we can do a commit. We can do all this within the context of Atom and we don't have to keep leaving and switching back and forth between the terminal and Atom, which really can help speed up our work flow.

Back to the top