MagentoSnippets
Magento Front End Snippets, plugin for Sublime Text
Details
Installs
- Total 5K
- Win 2K
- Mac 1K
- Linux 1K
Nov 21 | Nov 20 | Nov 19 | Nov 18 | Nov 17 | Nov 16 | Nov 15 | Nov 14 | Nov 13 | Nov 12 | Nov 11 | Nov 10 | Nov 9 | Nov 8 | Nov 7 | Nov 6 | Nov 5 | Nov 4 | Nov 3 | Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
Linux | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
MagentoSnippets
Magento Front End Snippets, plugin for Sublime Text.
This tool serves to aid the productivity during the Magento's theme development through snippets. These snippets brings partial codes belonging the Magento framework. These code that we used everyday, but never memorized because they are often complex and lengthy.
Installation
Install via Package Control
How do I use it?
The tab trigger of this plugin is “mg-*”.
In some editors just the tab key don't trigger the snippet, so you have to check few things to make magic happens like on gif below.
Check if you don't have set key binding for user (if so you have to remove it):
{ "keys": ["tab"], "command": "insert_best_completion", "args": {"default": "\t", "exact": true} },
If it still doesn't work add to your user settings below line:
"tab_completion": false,
Some people have assigned CTRL+Space as the snippet trigger
Check if another package is not coliding with snippet trigger (i.e. Emmet can cause some issues with Sublime Text 3 Snippet usage)
Suggestions
If you have something to improve these snippets, please create a issue
For how to do your own snippet and contribute for this tool see the contribution text
Available Snippets
XML
mg-addLinkRel
:: Add LinkRel in XMLmg-xml-cms-block
:: CMS Block in XMLmg-xml-css
:: Adds CSS in XMLmg-insert
:: Insert block Methodmg-local-xml
:: Writes the basic structure to a new local.xml filemg-ref
:: Add reference tagmg-rm
:: XML to removes a blockmg-removeItem
:: Remove head items by xmlmg-xml-setcolumn
:: Add number of columns in product listmg-set-template
:: Action to set a new root templatemg-xml-skinjs
:: Add skin js in XMLmg-unsetchild
:: Unset Child Methodmg-xml-text
:: Free text in XML
PHTML
mg-php-cms-block
:: CMS Block in PHTML(PHP+HTML)mg-format-price-currency
:: Format Pricemg-getAttrText
:: Get Attribute Text in product viewmg-getchildhtml
:: Get Child Html Methodmg-url
:: Get Urlmg-url-asec
:: Get Array Secure Urlmg-img
:: Image Skin Urlmg-productTypeId
:: Get Type Product Idmg-script
:: Adds script/javascript tagmg-storeInfo
:: Gets store informationmg-translate-phtml
:: Adds the translator helper outputmg-vars
:: Get Variable from adminmg-viewport
:: Viewport metatag to load media-queries
JS
mg-console-log
:: Add console.log for debugmg-iife-jquery
:: IIFE passing jQuery as parametermg-prototype-dom-ready
:: Adds Prototype DOM ready
SCSS
mg-clearfix
:: Creates a placeholder selector to fix floatsmg-scss-imgurl
:: Calls the image url functionmg-scss-sprite-height-width
:: Calls in scss sprite height and width functionsmg-scss-sprite
:: Calls in scss the Sprite function