Create Genesis snippet custom header for style.css

What is an snippet?

Snippet is a fragment of text used frecuently, as a developer experience some fragments of code are used again and again. You must create a snippet implementation as soon is required.

First of all, i’m select SublimeText3 (the lates version available).

Go to :  Tools/Developer/New Snippet

At the first time, we get a simple code of our new snippet, something like this:

[code] <snippet>
<content><![CDATA[ Hello, ${1:this} is a ${2:snippet}. ]]></content>




</snippet>

[/code]

${1:this}: Represent the first argument needed for snippet,
${2:snippet} represent the second argument, each number has a secuantial order defined.

Snippet Genesis Css Header

[code]

<snippet>
<content><![CDATA[
/* # Genesis Sample Child Theme
Theme Name: ${1:themeName}
Theme URI: ${2:themeURL}
Description: ${3:themeDescription}
Author: ${4:themeAuthor}
Author URI: ${5:themeAutorUrl}
Template: genesis
Template Version: 2.2.2
Tags: black, orange, white, one-column, two-columns, three-columns, left-sidebar, right-sidebar, responsive-layout, custom-menu, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Text Domain: ${6:themeFolderName}
*/

]]></content>

<tabTrigger>genesis-css-header</tabTrigger>

<scope>source.css</scope>
</snippet>

[/code]

Once you paste the code, save the file with .sublime-snippet extention in user folder (as Sublime suggested).

How to use it

Create a new css file, genesis-css-header is the TabTriggered name defined, type it and you can see a list of suggestion select the appropiate to get snippet format, already created.

Enjoy it!!

https://github.com/edyman/snippets/blob/master/genesis-css-header.sublime-snippet

Deja una respuesta