<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Ryan Warner</title>
    <description>The latest articles on Forem by Ryan Warner (@ryanwarner).</description>
    <link>https://forem.com/ryanwarner</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F261400%2F64513555-fdf8-4251-99a4-70ee62e8e33d.jpeg</url>
      <title>Forem: Ryan Warner</title>
      <link>https://forem.com/ryanwarner</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ryanwarner"/>
    <language>en</language>
    <item>
      <title>Creating custom VSCode snippets (now in video format!)</title>
      <dc:creator>Ryan Warner</dc:creator>
      <pubDate>Fri, 14 Feb 2020 18:19:48 +0000</pubDate>
      <link>https://forem.com/ryanwarner/create-custom-vscode-snippets-1ml0</link>
      <guid>https://forem.com/ryanwarner/create-custom-vscode-snippets-1ml0</guid>
      <description>&lt;p&gt;Creating custom snippets to fit your unique workflow will help you code faster.&lt;/p&gt;

&lt;p&gt;I turned my first &lt;a href="https://dev.to/ryanwarner/creating-custom-vscode-snippets-35bf"&gt;dev.to article&lt;/a&gt; into video format to better communicate the content.&lt;/p&gt;

&lt;p&gt;My full snippets file is on &lt;a href="https://github.com/RyanWarner/vscode-snippets/blob/master/Global.code-snippets"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There's a lot more you can do with snippets. Take a look at the &lt;a href="https://code.visualstudio.com/docs/editor/userdefinedsnippets"&gt;official documentation&lt;/a&gt; to see what's possible.&lt;/p&gt;

&lt;p&gt;This video is also posted on &lt;a href="https://www.youtube.com/watch?v=bJ4yc2o7Cds"&gt;YouTube&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>snippets</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Creating custom VSCode Snippets</title>
      <dc:creator>Ryan Warner</dc:creator>
      <pubDate>Sat, 01 Feb 2020 17:57:22 +0000</pubDate>
      <link>https://forem.com/ryanwarner/creating-custom-vscode-snippets-35bf</link>
      <guid>https://forem.com/ryanwarner/creating-custom-vscode-snippets-35bf</guid>
      <description>&lt;p&gt;When I find myself copying and pasting boilerplate code, I create a snippet to help me code faster.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u_dcTFNp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2rrnugb62xc6kvme2epy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u_dcTFNp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/2rrnugb62xc6kvme2epy.gif" alt="Create a global snippets file"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Create a global snippets file. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Code -&amp;gt; Preferences -&amp;gt; User Snippets&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Select "New Global Snippets File..."&lt;/li&gt;
&lt;li&gt;Name your file and press enter&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--olGmgKff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ddz3wtpz4ph304s9z45v.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--olGmgKff--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ddz3wtpz4ph304s9z45v.gif" alt="Define and use your snippet"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In this example, we're creating a simple React component snippet.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;snippets.code-snippets&lt;/span&gt;&lt;span class="w"&gt;

    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"ReactComponent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"prefix"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"component"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"scope"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"javascript"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"body"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"import React from 'react'"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"export default props =&amp;gt; {"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"  return &amp;lt;div&amp;gt;New Function Component&amp;lt;/div&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
          &lt;/span&gt;&lt;span class="s2"&gt;"}"&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Create a React component"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Save (&lt;code&gt;CMD+S&lt;/code&gt;) the &lt;code&gt;snippets.code-snippets&lt;/code&gt; file.&lt;/li&gt;
&lt;li&gt;Open a JavaScript file.&lt;/li&gt;
&lt;li&gt;Type your defined prefix and press tab.&lt;/li&gt;
&lt;li&gt;See your snippet appear.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What snippets will you create? If you make a snippet, I'd be interested to see it. Post a reply or DM me on &lt;a href="https://twitter.com/RyanWarnerCodes"&gt;Twitter&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;View my &lt;a href="https://github.com/RyanWarner/vscode-snippets/blob/master/Global.code-snippets"&gt;personal VSCode snippets on GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Sources: &lt;a href="https://code.visualstudio.com/docs/editor/userdefinedsnippets"&gt;The official VSCode docs, "Snippets in Visual Studio Code"&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can find more of my work on my website, &lt;a href="https://ryan.warner.codes"&gt;ryan.warner.codes&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>snippets</category>
      <category>efficiency</category>
    </item>
  </channel>
</rss>
