Wednesday, February 24, 2016

How to Use Code Snippets in Atom

Snippets are regularly-used chunks of code you can quickly insert into program files. They're useful and a core feature of the Atom text editor. That said, you can use the editor for many months without realising snippets are available or appreciating their power!

Atom packages and language grammars are often supplied with pre-defined snippets. For example, start or open a new HTML file then type img and hit the Tab key. The following code appears:

[code language="html"]
<img src="" alt="" />
[/code]

and the cursor will be between the src attribute quotes. Hit Tab again and the cursor will move to the alt attribute. Hit Tab a final time to move to the end of the tag.

Continue reading %How to Use Code Snippets in Atom%


by Craig Buckler via SitePoint

No comments:

Post a Comment