MagentoSnippets - Magento Front End Snippets, plugin for Sublime Text

Overview

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.

  1. 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} },
  2. If it still doesn't work add to your user settings below line:
    "tab_completion": false,
  3. Some people have assigned CTRL+Space as the snippet trigger
  4. Check if another package is not coliding with snippet trigger (i.e. Emmet can cause some issues with Sublime Text 3 Snippet usage)

MagentoSnippets: example of use

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

  1. mg-addLinkRel :: Add LinkRel in XML
  2. mg-xml-cms-block :: CMS Block in XML
  3. mg-xml-css :: Adds CSS in XML
  4. mg-insert :: Insert block Method
  5. mg-local-xml :: Writes the basic structure to a new local.xml file
  6. mg-ref :: Add reference tag
  7. mg-rm :: XML to removes a block
  8. mg-removeItem :: Remove head items by xml
  9. mg-xml-setcolumn :: Add number of columns in product list
  10. mg-set-template :: Action to set a new root template
  11. mg-xml-skinjs :: Add skin js in XML
  12. mg-unsetchild :: Unset Child Method
  13. mg-xml-text :: Free text in XML

PHTML

  1. mg-php-cms-block :: CMS Block in PHTML(PHP+HTML)
  2. mg-format-price-currency :: Format Price
  3. mg-getAttrText :: Get Attribute Text in product view
  4. mg-getchildhtml :: Get Child Html Method
  5. mg-url :: Get Url
  6. mg-url-asec :: Get Array Secure Url
  7. mg-img :: Image Skin Url
  8. mg-productTypeId :: Get Type Product Id
  9. mg-script :: Adds script/javascript tag
  10. mg-storeInfo :: Gets store information
  11. mg-translate-phtml :: Adds the translator helper output
  12. mg-vars :: Get Variable from admin
  13. mg-viewport :: Viewport metatag to load media-queries

JS

  1. mg-console-log :: Add console.log for debug
  2. mg-iife-jquery :: IIFE passing jQuery as parameter
  3. mg-prototype-dom-ready :: Adds Prototype DOM ready

SCSS

  1. mg-clearfix :: Creates a placeholder selector to fix floats
  2. mg-scss-imgurl :: Calls the image url function
  3. mg-scss-sprite-height-width :: Calls in scss sprite height and width functions
  4. mg-scss-sprite :: Calls in scss the Sprite function
You might also like...
A research raw data repository for researchers of Arba Minch University built using Codeigniter which follows MVC architecture. The front-end is build using Bootstrap.

Arba Minch University Dataset Repository This system is a research dataset repository for Arba Minch University researchers and is build using Codeign

This repository contains the code for the front end/UI of the login system
This repository contains the code for the front end/UI of the login system

Bug-free-login This repository contains the code for the front end/UI of the login system Requirements PHP 5.5.0 or higher. How to use Download ZIP wi

Starless Sky is a network protocol for secure identities, providing the use of assymetric identities, public information, end-to-end messaging and smart contracts
Starless Sky is a network protocol for secure identities, providing the use of assymetric identities, public information, end-to-end messaging and smart contracts

Descentralized network protocol providing smart identity over an secure layer. What is the Starless Sky Protocol? Starless Sky is a network protocol f

This Kirby V3 Plugin brings snippets and blueprints together in one place. It includes useful tools that completely changing the way you work with Kirby: Fast and well organized.
This Kirby V3 Plugin brings snippets and blueprints together in one place. It includes useful tools that completely changing the way you work with Kirby: Fast and well organized.

Kirby Components Overview Do you love to make awesome projects with Kirby CMS? Do you also find it difficult to switch between snippets and blueprints

In order to use the Korean Language on your Magento 2 store, it is time to start with Magento 2 Korean Language Pack in the set of informative documentations by Mageplaza. Magento 2 Korean Language Package is published by Magento 2 Translation Project at Crowdin, so all phrases will be replaced by the Korean language according to the contribution to that project. Please following up the guides in this post to convert the language with ease!
Laminas\Text is a component to work on text strings

laminas-text This package is considered feature-complete, and is now in security-only maintenance mode, following a decision by the Technical Steering

Zend\Text is a component to work on text strings from Zend Framework

zend-text Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-text. Zend\Text is a component to work on text strings. It cont

Easily create and work with code snippets from PHP

code-snippets Easily create and work with code snippets from source code files of any type in PHP. The original code this package is based on was borr

A library of powerful code snippets to help you get the job done with Gravity Forms and Gravity Perks.

Gravity Wiz Snippet Library Gravity Wiz is creating the most comprehensive library of snippets for Gravity Forms ever. We'll be consistently moving ou

Comments
  • Em alguns snippets o $this não aparece

    Em alguns snippets o $this não aparece

    Quando fui utilizar o snippets de bloco estático no sublime ele não colocou o $this antes, ficando dessa forma:

    getLayout()->createBlock('cms/block')->setBlockId('')->toHtml(); ?> bug 
    opened by nathpaiva 2
  • Inserido GetVars e SetComlumns na listagem de produtos

    Inserido GetVars e SetComlumns na listagem de produtos

    GetVars pega a variável que for definida no admin em um arquivo .phtml

    SetColumns define no xml o número de colunas que a listagem de produtos vai ter

    opened by edersilva 2
  • Possible fixes for TAB key not triggering steps

    Possible fixes for TAB key not triggering steps

    https://github.com/MageFront/MagentoSnippets/issues/8

    Added possible fixes to problem when TAB key is not triggering the snippet steps. Fixed typo Avaiable > Available

    opened by versedi 1
  • Update the 1.0.3.txt according the last updates and push the tags 1.0.3

    Update the 1.0.3.txt according the last updates and push the tags 1.0.3

    I'm needing more people to work in this repository.

    Please if some holy souls wants to help, here is two tasks:

    1. Update the text of /messages/1.0.3.txt according the new snippets pushed (they are listed in README). It is just compare the README file in master with the tag 1.0.2.

    2. Push the 1.0.3 tag

    enhancement 
    opened by vanessametonini 0
Owner
MageFront
Repositório de código fonte das dicas e tutoriais escritos no blog MageFront
MageFront
Bracket and tag highlighter for Sublime Text

BracketHighlighter Bracket Highlighter matches a variety of brackets such as: [], (), {}, "", '', <tag></tag>, and even custom brackets. This was orig

Isaac Muse 1.7k Dec 27, 2022
A Sublime Text 3 package for highlighting both Sass and SCSS syntax.

Syntax Highlighting for Sass This is a Sublime Text 3 package which purely forced on highlighting both Sass and SCSS syntax as accuracy as possible. P

Peiwen Lu 291 Jun 26, 2022
Resources for the Magento 2 Certified Professional Front End Developer exam

Magento 2 Certified Professional Front End Developer Training Resources Below are the 6 slide decks used internally at Fisheye to help us prepare for

Fisheye Academy 109 Oct 21, 2022
Next-generation front-end for Magento 2

The next-generation front-end for Magento 2. Fast. Reliable. Extensible. Getting started – create a new application and deploy it as Magento 2 theme o

ScandiPWA 509 Jan 2, 2023
Set of front-end tools for Magento 2 based on Gulp.js

Magento 2 Frontools Set of front-end tools for Magento 2 Requirements Unix-like OS (please, do not ask about Windows support) Node.js LTS version. We

SNOW.DOG 433 Dec 6, 2022
WordPress plugin which contains a collection of modules to apply theme-agnostic front-end modifications

Soil A WordPress plugin which contains a collection of modules to apply theme-agnostic front-end modifications. Soil is a commercial plugin available

Roots 1k Dec 20, 2022
Nuber is an open source container management platform it provides a front end to manage your own cloud infrastructure, using Linux Containers virtualization technology

Nuber is an open source container management platform it provides a front end to manage your own cloud infrastructure, using Linux Containers virtualization technology

null 33 Dec 14, 2022
A next-generation package manager for the front-end

Duo is a next-generation package manager that blends the best ideas from Component, Browserify and Go to make organizing and writing front-end code qu

Duo 3.4k Dec 28, 2022
Phalcon Mooc an example API + Front End with automated tests

NovaMooc - a Phalcon project A Mooc project developed with Phalcon, a PHP framework. Key Features • How To Use • Contributing • Credits • License Key

Les Enovateurs 19 Dec 4, 2022
Simply removes the applcation's front-end and redirects it to the admin area.

Simply removes the application's front-end and redirects it to the admin area.

Albright Labs 1 Mar 28, 2022