The basic features in Atom allow you to easily modify content within your projects. Learn how easy it is to do things in Atom.
- [Instructor] So far, we've been focusing on actions that let you take a look at and organize content. Let's take a look at a few features that let you modify content. So, I'm going to talk right now about the features that are in this Edit menu and then Lines right here. I use these quite a bit. These aren't easy to find in the command palate, so normally I tend to go to the command palate when it's a grouping of things that are closely related or at least named in similar ways.
This is one where you can see that these aren't named at all in the same way. So, Indent and Outdent is something that I use quite a bit, so indentation's really good, because it turns on this collapsing feature that we talked about in the previous video. If you don't indent things correctly, then collapsing is not going to be easy to do. Now, to indent things, all you need to do is usually just hit Tab and then Shift+Tab to go back. But, if you want to have more control over the indentation, you can also hit the Command+right bracket and that's Control+right bracket on a PC and actually Command and Control and then the brackets will let you go to the right or to the left, so left bracket will let you go to the left.
So, I do that all the time to just indent how my text looks. Now, there's another option that's actually pretty good. So, I'm going to select my entire document. So, if you go to the Edit menu, you can see that I can choose this Select All and I am using those command keys. These are pretty sort of common things that you do on documents, so I'm not really talking about Undo and Redo, 'cause I imagine you probably already know how to do that or Cut, Copy. There's things like Copy Paths here, but you know how to Paste, Select All. So, I'm generally not talking about those things, just focusing on things that make you productive.
Anyway, so I'm going to select everything in this document and just hit Control+left bracket on a PC, just to unindent the entire document. Then, I'm going to show you this sort of neat feature that you can use under the Edit menu and then if you go to Lines and select Auto Indent, it's going to indent the lines for you and it's going to analyze sort of the type of document that you're using and try to do as good a job as it can. It's not perfect and I'm always sort of scared of using it, 'cause I'm very picky about how I indent things, but if you're getting a document from somebody else and you want it to sort of be auto-indented, this could be a good way of solving that problem.
So, that's sort of a nice feature. Another option in this Lines section of the menus, is to take a line and move it around with command keys. So, this is actually useful if you have something like this that is a list and you realize that you want to move this grid sort of line down. What you do is, you hit the Command and Control key, this would be just the Control key on a PC, and then you can use the up and down arrows. Now, you can also easily duplicate a line and this is actually quite useful when you're making, say you made the first one of these list elements and then you just want to make some additional ones, you can duplicate a line with Command+Shift+D on a Mac.
That is Control+Shift+D on a PC. And then you can have some additional elements. In the same way you can delete a line by hitting Control+Shift+K on a Mac or PC. So, Control+Shift+K and that gets rid of the lines. So, let's go ahead and get rid of those lines that I just made right there. So, those are pretty useful, especially the duplicating of a line, I think. I use all the time. There is an additional option here and it is for joining lines.
I really wouldn't use this on any sort of HTML document. It's really if you have some lines that have carriage returns in them and you want to put them together. It's really not very helpful for things like HTML documents. It tends to mess up you indentation and it doesn't work quite well. But, if you do have some sort of text document that has been heavily carriage returned, then you can get rid of them by using this Join Lines option here.
- Downloading and installing Atom
- Managing tabs and panes
- Managing and folding content
- Changing text
- Working with selections
- Customizing Atom packages
- Customizing themes
- Paid coding with Atom Teletype
- Working with the Atom IDE
- Installing useful packages
- Integrating Atom with Git and GitHub