Sublime Text is a fantastic cross-platform text/code editor that’s fast, lightweight, customizable and powerful. The same adjectives hold good for the Genesis WordPress framework.
In the past Justin Tallant has created a Sublime Text package for Genesis that includes 24 snippets some of which have not been updated to account for the HTML5 update of Genesis.
I have put together a collection of snippets that fixed the ones needing to be updated from Justin’s package, then everything from the StudioPress snippets page and some that I have come up with on my own (which I frequently use in client projects).
At the time of writing this, the snippets count is 114.
To download the Genesis snippets and to add them in your Sublime Text, click the link below and follow the instructions on the GitHub page linked below.
Below is a overview video of how to use these snippets:
Press Cmd + Shift + P (Mac) or Ctrl + Shift + P (PC) to being up the Command Palette, start typing the first few alphabets of the Genesis code snippet you want to insert and when you find the match, hit enter/return.
Additions, corrections and contributions via GitHub are more than welcome.
Hey Sridhar,
I’ve said it before already : just awesome! Thanks for this!
best regards,
Hans
Very grateful for this, Sridhar! Using it a LOT already! Thanks so much! 🙂
Very nice. Makes me want to move from Coda to Sublime too
I’m a Coda user too, and while not looking to move to something else right now, I do use Sublime Text occasionally to quickly edit a file. This kind of support could move me in that direction, and get me over the hump to stop using the trial version ($$$). I’d be curious to see more posts from Sridhar on how he uses Sublime Text to work on live sites as well as development pieces. I like Coda’s feature to save all of my sites FTP information. I’m sure there is something to be used as an add on or function for Sublime, right?
As long as I’m this far off topic, I’ll say that I would like to know some of the programs that Sridhar uses on his Mac. I don’t recognize many of the icons in his dock when watching the video tutorials. Can you enlighten us Sridhar? Maybe even share some more workflow ideas when working in Genesis.
Thank you for your wonderful tutorials!
Looks awesome Sridhar, thanks!
For some reason, after following the steps, only one snippet appears in the search which is the ‘custom page template in Genesis’. No other Genesis ones appear. I will play around and see if I can see why it isn’t working and report back if i find out why. PS I’m on mac and with an unregistered version of sublime text 2, as I only downloaded it to try this out.
Figured it out, I think you had already mentioned this actually, but it doesn’t work until you actually save the file as .php
Yes, that’s right.
The PHP code snippets are meant to work only in PHP files.
Thanks Sridhar
I was starting to look into brackets.io as I didn’t want to suddenly get left behind on Sublime. Worried about the future of Sublime. Seems development on it has stopped.
Whats your take on that?
Indeed. Sublime development appears stale at the moment. But for what I do, it has got almost everything (except a better working auto completion in css files) and is pretty stable.
For now I’ll use Sublime and if the dev abandons it completely, then look into other options like Brackets.
This is so great, thanks.
If I wanted to make a snippet could I just substitute in/out some code? Specifically, I don’t think you have a snippet for this, I want to remove the Genesis Loop…
Remove default Genesis Loop
source.php.embedded.block.html
Thanks man. This is really helpful. I’m glad to see that you have shared it for free. Thanks again 🙂
Great work. (y)
[…] https://sridharkatakam.com/sublime-text-snippets-for-genesis/ […]
[…] perfect and publish. I shared my personal code snippets collection, created a comprehensive set of Genesis snippets for Sublime Text, started Genesis chat on Slack and troubleshooted many users’ queries during this […]
There any way to pass this wonder to Atom? … I think they are compatible, but I can not do it myself …
I would love to see this ported to Atom also. There’s already an attempt (https://atom.io/packages/genesis-snippets) at something similar, but I can’t get it to work. It’s not as easy as Sridhar’s.
I’ve been looking at the documentation for building packages for Atom and it’s not intuitive. I was hoping to just fork this repo, but I don’t think that will work. If I can get something working, I’ll post back here with the details.
[…] Sublime Text – this is the ONLY application you need for editing any of the files in your WordPress installs. As with all awesome community members, Sridhar has given us Genesis specific Text Snippets. […]
Hello
i am use sublime-text 3 build 3103, i tried using Your sublime-text-snippets-for-genesis. if i press Ctrl + Shift + P (on PC) when i am inside Sublime Text and start typing the Genesis code snippet that i like to insert it not show me all the code. Other code appears while another is not displayed. For example if i typing “add” is not display all snnipet with the word “add”. if i typing “breadcrumbs” it does not appear.
1-how can fixed?
2-what sublime-text version you use whith sublime-text-snippets-for-genesis?
issu pic
http://pix.toile-libre.org/?img=1455367973.png
http://pix.toile-libre.org/?img=1455368267.png
http://pix.toile-libre.org/?img=1455368534.png
I’ve just committed an update. Replace all your existing snippets with the latest ones.
See https://twitter.com/srikat/status/697656332275462145 and https://forum.sublimetext.com/t/snippets-stopped-working/17450 for more info.
thank you man. it work well now
This is wonderful, thanks!
In your video, I notice you also have autocompletion for Genesis hooks. Where is that coming from?
via TextExpander.
https://sridharkatakam.com/useful-textexpander-abbreviations/
Hi, it’s not working anymore. Most of the files contains
source.php
instead of
source.php, text.plain
ris
that make the snippet visible in the command palette and triggers the pasting of the code snippet