Demac Media Demac Media Brand Demac Media Brand

Blog

Subscribe

Getting to Know One Another: A More In-Depth Look at Sublime Text

Timer Icon 5 Mins

Development, eCommerce

Last time we spoke, I had introduced you to a few of the things Sublime Text can do.

I’d like to go over a few more things you can do to get the most out of your editor.

Related: [Mini Tutorial] Changing the order of layout XML blocks in local.xml

To begin with, let’s start with making our editor do some of the work for us under the hood to make the development process a lot smoother. To do this, we’re going to want to go to Sublime Text -> Preferences -> Settings - User. Any code that you write in here must be in JSON format, with all of it falling between the curly braces ({}), and all strings in quotations. I’ve prepared some settings that I find helpful that you can throw right into your user settings file, see here for a more complete list.


{
"bold_folder_labels": true,
"caret_style": "wide",
"font_size": 14,
"highlight_line": true,
"highlight_modified_tabs": true,
"line_padding_bottom": 1,
"line_padding_top": 1,
"match_brackets": true,
"match_brackets_angle": true,
"match_brackets_braces": true,
"match_brackets_content": true,
"match_brackets_square": true,
"open_files_in_new_window": false,
"scroll_past_end": true,
"show_full_path": true,
"spell_check": true,
"word_wrap": true
}

A note about word wrap: be wearing of this when working with languages that render white space, as it may cause problems.

I think by now you realize that I’m big on cutting down on writing code that you don’t have to, hence my love of Emmet. Another great feature of Sublime Text is the ability to create “snippets”, which are little bits of code that you can re-use. What Emmet is doing is essentially giving you access to a host of snippets that the Emmet team noticed that they were using frequently, and we can do the same. To create a snippet click on Tools -> New Snippet. This should bring you to a new tab that already has some code written on it. Let’s take a look to make sense of it while making our own snippet.

Related: Why I hate using JavaScript plugins, and You Should Too

Making our own snippets

Hopefully you can use the information in this post to cut down on your work time, happy hacking!

Related: [Mini-Tutorial] How to Add Subcategories in Shopify

Subscribe to the Blog

Stay updated with 20,000+ eCommerce leaders in our community

Sign Up

Let’s talk about your 10X return

Icon/Social/Phone Contact us for pricing information