{"id":28067,"date":"2016-09-26T21:01:47","date_gmt":"2016-09-26T13:01:47","guid":{"rendered":"https:\/\/www.hongkiat.com\/blog\/?p=28067"},"modified":"2017-10-31T20:28:48","modified_gmt":"2017-10-31T12:28:48","slug":"add-custom-code-snippets-atom","status":"publish","type":"post","link":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/","title":{"rendered":"How to Add Custom Code Snippets to Atom"},"content":{"rendered":"<p>It\u2019s not a coincidence that <strong><a href=\"https:\/\/atom.io\/\" target=\"_blank\">Atom<\/a><\/strong>, the source code editor created by Github is popular in the web development community. It\u2019s not only <strong>easily extensible<\/strong> with thousands of <a href=\"https:\/\/atom.io\/packages\" target=\"_blank\">Atom Packages<\/a>, and has a <strong>wide language support<\/strong>, but almost its every part is <strong>customizable<\/strong> by the user.<\/p>\n<p>By leveraging Atom\u2019s <strong><a href=\"https:\/\/github.com\/atom\/snippets\" target=\"_blank\">Snippets<\/a> feature<\/strong>, you can make your coding workflow more productive, as by <strong>reusing recurring code snippets<\/strong> you can reduce the repetitive part of your work. In this post, I\u2019ll show you how you can <strong>use Atom\u2019s built-in code snippets<\/strong>, and <strong>create your own custom snippets<\/strong>.<\/p>\n<p class=\"recommended_top\">\n\t\t\t\t\t<strong>Read Also:<\/strong>\u00a0\n\t\t\t\t\t<a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/atom-code-editor\/\">A Look Into Atom: Github\u2019s New Code Editor<\/a>\n\t\t\t\t<\/p>\n<h2>Use built-in code snippets<\/h2>\n<p>By default, Atom comes with <strong>built-in code snippets<\/strong>, each of which is <strong>bound to a scope<\/strong> belonging to a certain file type. For instance, if you are working on a file with <code>.js<\/code> extension, only snippets belonging to the JavaScript scope will be available for that file.<\/p>\n<p>To see <strong>all available snippets<\/strong> for your current file type, hit <span class=\"key\">Alt<\/span>+<span class=\"key\">Shift<\/span>+<span class=\"key\">S<\/span>. If you choose a snippet from the drop-down list and click on it, Atom will insert the full snippet into your editor without any further hassle.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/all-builtin-snippets.gif\" width=\"700\" height=\"430\" alt=\"All Built-In Snippets\"><\/figure>\n<p>If you are already aware of the options, you don\u2019t necessarily have to load the whole list. When you start to type, Atom pops an <strong>autocomplete results box<\/strong> up, that contains the available code snippets belonging to the certain scope and the string you\u2019ve typed so far.<\/p>\n<p>For example, if you type the <code>h<\/code> character into a <code>.html<\/code> file, a dropdown list with all built-in HTML snippets beginning with <code>h<\/code> will appear.<\/p>\n<p>By clicking on any option, Atom will <strong>paste the full HTML tag<\/strong> (e.g. <code>&lt;h1&gt;&lt;\/h1&gt;<\/code>), and <strong>position the cursor within the starting and closing tag<\/strong>.<\/p>\n<p>If you don\u2019t want to bother with the dropdown list, you can achieve the same result by typing <code>h1<\/code>, and hitting <span class=\"key\">Tab<\/span> or <span class=\"key\">Enter<\/span> \u2014 both of these keys <strong>insert the full code snippet<\/strong> belonging to the prefix of the snippet.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/html-builtins.jpg\" width=\"700\" height=\"469\" alt=\"Built-In HTML Code Snippets\"><\/figure>\n<p class=\"recommended_top\">\n\t\t\t\t\t<strong>Read Also:<\/strong>\u00a0\n\t\t\t\t\t<a target=\"_blank\" href=\"https:\/\/www.hongkiat.com\/blog\/regex-web-developers\/\">30 Useful Regex Code Snippets for Web Developers<\/a>\n\t\t\t\t<\/p>\n<h2>Adding your custom code snippets<\/h2>\n<h3>1. Find the configuration file<\/h3>\n<p>To add your own custom code snippets to Atom, first you need to find the <strong>configuration file called <code>snippets.cson<\/code><\/strong> that is a <strong><a href=\"https:\/\/github.com\/bevry\/cson\" target=\"_blank\">CoffeeScript Object Notation<\/a><\/strong> file.<\/p>\n<p>Click on the <code>File &gt; Snippets...<\/code> menu in the top bar, and Atom will open the <code>snippets.cson<\/code> file to which you can add your own custom snippets.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/snippets-cson.jpg\" width=\"700\" height=\"469\" alt=\"Snippets Configuration File\"><\/figure>\n<h3>2. Find the Right Scope<\/h3>\n<p>You will need <strong>four things<\/strong> in order to add your custom snippet:<\/p>\n<ol>\n<li>The <strong>name of the scope<\/strong><\/li>\n<li>The <strong>name of the snippet<\/strong><\/li>\n<li>The <strong>prefix<\/strong> that will function as the handle of the snippet<\/li>\n<li>The <strong>body of the snippet<\/strong><\/li>\n<\/ol>\n<p>The name, the prefix, and the body of the snippet (2-4) solely depends on you, however you must <strong>find the name of the scope<\/strong> (1) before adding your custom snippets.<\/p>\n<p>To find the scope you need, click on the <code>File &gt; Settings<\/code> menu in the top menu bar, then find the <code>Packages<\/code> tab among the Settings. Here, run a search for the scope you need, for example if you want to add code snippets to the HTML language, type <code>HTML<\/code> into the search bar.<\/p>\n<p>Click on the <strong>language support package<\/strong> of the chosen language, and open its own Settings. Among the <strong>Grammar settings<\/strong>, you can quickly find the name of the scope, as you can see on the screenshot below.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/language-scope.jpg\" width=\"700\" height=\"513\" alt=\"Language Scope\"><\/figure>\n<p>Here are some scopes you may want to use in your Atom projects:<\/p>\n<ul>\n<li>Plain Text: <code>.text.plain<\/code><\/li>\n<li>HTML: <code>.text.html.basic<\/code><\/li>\n<li>CSS: <code>.source.css<\/code><\/li>\n<li>Sass: <code>.source.sass<\/code><\/li>\n<li>LESS: <code>.source.css.less<\/code><\/li>\n<li>JavaScript: <code>.source.js<\/code><\/li>\n<li>PHP: <code>.text.html.php<\/code><\/li>\n<li>Python: <code>.source.python<\/code><\/li>\n<li>Java: <code>.source.java<\/code><\/li>\n<\/ul>\n<p>Don\u2019t forget that you will need to <strong>add a dot (<code>.<\/code>) in front of the name of the scope<\/strong> in order to use it in the <code>snippets.cson<\/code> file.<\/p>\n<h3>3. Create Single-Line Code Snippets<\/h3>\n<p>To create a <strong>single-line code snippet<\/strong>, you need to add the scope, the name, the prefix, and the body of the snippet to the <code>snippets.cson<\/code> file, using the following syntax:<\/p>\n<pre>\r\n'.text.html.basic':\r\n    'Widget Title':\r\n      'prefix': 'wti'\r\n      'body': '&lt;h4 class=\"widget-title\"&gt;&lt;\/h4&gt;'\r\n<\/pre>\n<p>This example snippet adds a <code>&lt;h4&gt;<\/code> tag with the <code>widget-title<\/code> class to the HTML scope. You can add any other single-line code snippet to your Atom editor following this syntax.<\/p>\n<p>After saving the configuration file, whenever you <strong>type the prefix & hit the <span class=\"key\">Tab<\/span> key<\/strong>, Atom will paste the belonging snippet body into your code editor. The name of the snippet (in the example <code>Widget Title<\/code>) will be displayed in the autocomplete results box.<\/p>\n<h3>4. Create Multi-Line Code Snippets<\/h3>\n<p><strong>Multi-line code snippets<\/strong> use a little bit different syntax. You need to add the same data as for single-line snippets \u2014 the scope, the name, the prefix, and the body of the snippet.<\/p>\n<p>What is different here is that you need to place the snippet body <strong>within a pair of <code>\"\"\"<\/code> (three double-quotes)<\/strong>.<\/p>\n<pre>\r\n'.text.html.basic':\r\n    'Image Link':\r\n      'prefix': 'iml'\r\n      'body': \"\"\"\r\n        &lt;figure&gt;\r\n          &lt;a href=\"\" target=\"_blank\"&gt;\r\n            &lt;img src=\"\" width=\"\" height=\"\" alt=\"\"&gt;\r\n            &lt;\/a&gt;\r\n        &lt;\/figure&gt;\r\n        \"\"\"\r\n<\/pre>\n<p>If you want to add <strong>more than one custom snippets<\/strong> to the same scope, add the name of the scope <strong>only once<\/strong>, then list the snippets one by one:<\/p>\n<pre>\r\n'.text.html.basic':\r\n    'Widget Title':\r\n      'prefix': 'wti'\r\n      'body': '&lt;h4 class=\"widget-title\"&gt;&lt;\/h4&gt;'\r\n    'Image Link':\r\n      'prefix': 'iml'\r\n      'body': \"\"\"\r\n        &lt;figure&gt;\r\n          &lt;a href=\"\" target=\"_blank\"&gt;\r\n            &lt;img src=\"\" width=\"\" height=\"\" alt=\"\"&gt;\r\n          &lt;\/a&gt;\r\n        &lt;\/figure&gt;\r\n        \"\"\"\r\n<\/pre>\n<h3>5. Add Tab Stops<\/h3>\n<p>You can further facilitate the usage of your custom code snippets by adding <strong>tab stops<\/strong> to the snippet body. Tab stops indicate the spots where the user can navigate by using the <span class=\"key\">Tab<\/span> key. With tab stops you can save the time that in-text navigation requires.<\/p>\n<p>You can add tab stops <strong>using the <code>$1, $2, $3, ...<\/code> syntax<\/strong>. Atom will position the cursor to the place it finds <code>$1<\/code>, then you can jump to <code>$2<\/code> with the <span class=\"key\">Tab<\/span> key, then to <code>$3<\/code>, and so on.<\/p>\n<pre>\r\n'.text.html.basic':\r\n    'Image Link':\r\n      'prefix': 'iml'\r\n      'body': \"\"\"\r\n        &lt;figure&gt;\r\n          &lt;a href=\"$1\" target=\"_blank\"&gt;\r\n            &lt;img src=\"$2\" width=\"$3\" height=\"$4\" alt=\"$5\"&gt;\r\n            &lt;\/a&gt;\r\n        &lt;\/figure&gt;\r\n        \"\"\"\r\n<\/pre>\n<h3>6. Add Optional Parameters<\/h3>\n<p>Atom allows you to <strong>add extra information<\/strong> to your snippets by using <strong><a href=\"https:\/\/github.com\/atom\/snippets#optional-parameters\" target=\"_blank\">optional parameters<\/a><\/strong>. This feature can be useful if someone else also uses your editor and you want to let them know the purpose of the snippet, or if you have so complicated custom snippets that you need to add notes to them.<\/p>\n<p>The values of the optional parameters are <strong>displayed in the autocomplete results box<\/strong> that comes up when you begin to type a prefix. In the example below, I added a description & a <code>More...<\/code> link to the previous <code>Widget Title<\/code> custom snippet:<\/p>\n<pre>\r\n'.text.html.basic':\r\n    'Widget Title':\r\n      'prefix': 'wti'\r\n      'body': '&lt;h4 class=\"widget-title\"&gt;&lt;\/h4&gt;'\r\n      'description': 'You can add a widget title with this\r\n          snippet to your sidebar widget.'\r\n      'descriptionMoreURL': 'http:\/\/hongkiat.com'\r\n<\/pre>\n<p>When the user begins to type the prefix <code>wti<\/code>, the extra information (description + link) will be displayed at the bottom of the autocomplete results box. Have a look at the <strong><a href=\"https:\/\/github.com\/atom\/snippets#optional-parameters\" target=\"_blank\">other optional parameters<\/a><\/strong> you can use to add extra information to your custom snippets.<\/p>\n<figure><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/optional-parameters.jpg\" width=\"700\" height=\"279\" alt=\"Optional Parameters\"><\/figure>","protected":false},"excerpt":{"rendered":"<p>It\u2019s not a coincidence that Atom, the source code editor created by Github is popular in the web development community. It\u2019s not only easily extensible with thousands of Atom Packages, and has a wide language support, but almost its every part is customizable by the user. By leveraging Atom\u2019s Snippets feature, you can make your&hellip;<\/p>\n","protected":false},"author":146,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3392],"tags":[3028,3029],"topic":[4520],"class_list":["entry-content","is-maxi"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.8 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Add Custom Code Snippets to Atom - Hongkiat<\/title>\n<meta name=\"description\" content=\"It&#039;s not a coincidence that Atom, the source code editor created by Github is popular in the web development community. It&#039;s not only easily extensible\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Add Custom Code Snippets to Atom\" \/>\n<meta property=\"og:description\" content=\"It&#039;s not a coincidence that Atom, the source code editor created by Github is popular in the web development community. It&#039;s not only easily extensible\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/\" \/>\n<meta property=\"og:site_name\" content=\"Hongkiat\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/hongkiatcom\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-26T13:01:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-10-31T12:28:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/all-builtin-snippets.gif\" \/>\n<meta name=\"author\" content=\"Anna Monus\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:site\" content=\"@hongkiat\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Anna Monus\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/\"},\"author\":{\"name\":\"Anna Monus\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/a601053a0ab457901e00cdc83bd5359e\"},\"headline\":\"How to Add Custom Code Snippets to Atom\",\"datePublished\":\"2016-09-26T13:01:47+00:00\",\"dateModified\":\"2017-10-31T12:28:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/\"},\"wordCount\":1001,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/add-custom-code-snippets-atom\\\/all-builtin-snippets.gif\",\"keywords\":[\"Atom\",\"Code Editors\"],\"articleSection\":[\"Coding\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/\",\"name\":\"How to Add Custom Code Snippets to Atom - Hongkiat\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/add-custom-code-snippets-atom\\\/all-builtin-snippets.gif\",\"datePublished\":\"2016-09-26T13:01:47+00:00\",\"dateModified\":\"2017-10-31T12:28:48+00:00\",\"description\":\"It's not a coincidence that Atom, the source code editor created by Github is popular in the web development community. It's not only easily extensible\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/#primaryimage\",\"url\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/add-custom-code-snippets-atom\\\/all-builtin-snippets.gif\",\"contentUrl\":\"https:\\\/\\\/assets.hongkiat.com\\\/uploads\\\/add-custom-code-snippets-atom\\\/all-builtin-snippets.gif\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/add-custom-code-snippets-atom\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Add Custom Code Snippets to Atom\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"name\":\"Hongkiat\",\"description\":\"Tech and Design Tips\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#organization\",\"name\":\"Hongkiat.com\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"contentUrl\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/wp-content\\\/uploads\\\/hkdc-logo-rect-yoast.jpg\",\"width\":1200,\"height\":799,\"caption\":\"Hongkiat.com\"},\"image\":{\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/hongkiatcom\",\"https:\\\/\\\/x.com\\\/hongkiat\",\"https:\\\/\\\/www.pinterest.com\\\/hongkiat\\\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/#\\\/schema\\\/person\\\/a601053a0ab457901e00cdc83bd5359e\",\"name\":\"Anna Monus\",\"description\":\"Anna is Technical Editor and Writer for Hongkiat.com. She mainly covers front-end frameworks, web standards, accessibility, WordPress development, and UX design.\",\"sameAs\":[\"https:\\\/\\\/www.annalytic.com\\\/\"],\"url\":\"https:\\\/\\\/www.hongkiat.com\\\/blog\\\/author\\\/anna_monus\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Add Custom Code Snippets to Atom - Hongkiat","description":"It's not a coincidence that Atom, the source code editor created by Github is popular in the web development community. It's not only easily extensible","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/","og_locale":"en_US","og_type":"article","og_title":"How to Add Custom Code Snippets to Atom","og_description":"It's not a coincidence that Atom, the source code editor created by Github is popular in the web development community. It's not only easily extensible","og_url":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/","og_site_name":"Hongkiat","article_publisher":"https:\/\/www.facebook.com\/hongkiatcom","article_published_time":"2016-09-26T13:01:47+00:00","article_modified_time":"2017-10-31T12:28:48+00:00","og_image":[{"url":"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/all-builtin-snippets.gif","type":"","width":"","height":""}],"author":"Anna Monus","twitter_card":"summary_large_image","twitter_creator":"@hongkiat","twitter_site":"@hongkiat","twitter_misc":{"Written by":"Anna Monus","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/#article","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/"},"author":{"name":"Anna Monus","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/a601053a0ab457901e00cdc83bd5359e"},"headline":"How to Add Custom Code Snippets to Atom","datePublished":"2016-09-26T13:01:47+00:00","dateModified":"2017-10-31T12:28:48+00:00","mainEntityOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/"},"wordCount":1001,"commentCount":2,"publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/all-builtin-snippets.gif","keywords":["Atom","Code Editors"],"articleSection":["Coding"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/","url":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/","name":"How to Add Custom Code Snippets to Atom - Hongkiat","isPartOf":{"@id":"https:\/\/www.hongkiat.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/#primaryimage"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/#primaryimage"},"thumbnailUrl":"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/all-builtin-snippets.gif","datePublished":"2016-09-26T13:01:47+00:00","dateModified":"2017-10-31T12:28:48+00:00","description":"It's not a coincidence that Atom, the source code editor created by Github is popular in the web development community. It's not only easily extensible","breadcrumb":{"@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/#primaryimage","url":"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/all-builtin-snippets.gif","contentUrl":"https:\/\/assets.hongkiat.com\/uploads\/add-custom-code-snippets-atom\/all-builtin-snippets.gif"},{"@type":"BreadcrumbList","@id":"https:\/\/www.hongkiat.com\/blog\/add-custom-code-snippets-atom\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.hongkiat.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Add Custom Code Snippets to Atom"}]},{"@type":"WebSite","@id":"https:\/\/www.hongkiat.com\/blog\/#website","url":"https:\/\/www.hongkiat.com\/blog\/","name":"Hongkiat","description":"Tech and Design Tips","publisher":{"@id":"https:\/\/www.hongkiat.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hongkiat.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.hongkiat.com\/blog\/#organization","name":"Hongkiat.com","url":"https:\/\/www.hongkiat.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","contentUrl":"https:\/\/www.hongkiat.com\/blog\/wp-content\/uploads\/hkdc-logo-rect-yoast.jpg","width":1200,"height":799,"caption":"Hongkiat.com"},"image":{"@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/hongkiatcom","https:\/\/x.com\/hongkiat","https:\/\/www.pinterest.com\/hongkiat\/"]},{"@type":"Person","@id":"https:\/\/www.hongkiat.com\/blog\/#\/schema\/person\/a601053a0ab457901e00cdc83bd5359e","name":"Anna Monus","description":"Anna is Technical Editor and Writer for Hongkiat.com. She mainly covers front-end frameworks, web standards, accessibility, WordPress development, and UX design.","sameAs":["https:\/\/www.annalytic.com\/"],"url":"https:\/\/www.hongkiat.com\/blog\/author\/anna_monus\/"}]}},"jetpack_featured_media_url":"https:\/\/","jetpack_shortlink":"https:\/\/wp.me\/p4uxU-7iH","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/28067","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/users\/146"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/comments?post=28067"}],"version-history":[{"count":1,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/28067\/revisions"}],"predecessor-version":[{"id":28068,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/posts\/28067\/revisions\/28068"}],"wp:attachment":[{"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/media?parent=28067"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/categories?post=28067"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/tags?post=28067"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.hongkiat.com\/blog\/wp-json\/wp\/v2\/topic?post=28067"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}