Comment on page
Editmode For Sublime Text
Editmode for Sublime is a simple plugin which adds a keyboard shortcut to Sublime Text, allowing you to instantly convert content inside to chunks - it will take the text, send it to the Editmode API which returns an identifier, and replace it with a Editmode helper. Used in conjunction with Editmode.js, it allows one to very quickly convert an existing site to be fully editable by anyone in a short space of time.
- Every open directory in Sublime is seen as a project. In order toapply project specific settings, you need to save the existing openproject:
Project -> Save Project As
- I would recommend saving the project file in the directory you wouldlike the settings to apply to.
- Once the .sublime-project file is saved, open it and add the correctpath and chunks authentication token
{
"folders":[{ "path": "." }
],
"settings": {
"em_authentication_token": "YOURTOKENHERE",
"em_default_snippet_template" : "rails_erb",
"em_snippet_templates" : {
"rails_erb" : "<%= chunk('{label}','{identifier}') %>"
}
}
}
- Close the current folder or files in Sublime, then hit "Project ->Open Project" and open the project you just saved.
Select a piece of text and hit
cmd + shift + L
in any open file inside a configured Sublime project.- The em_authentication_token identifies the Editmode project wherethe chunk will be saved to. You can find this in your Editmodeaccount.
- The plugin adds a keyboard shortcut (CMD+SHIFT+L) which you can usewith any open file in a project where you have already specifiedyour em_authentication_token.
- Select the text you'd like to replace, then hit the keyboardshortcut, and Sublime will send the text to the configured Editmodeproject, and add a view helper in it's place. (Currently this usesthe rails view helper syntax, but this can be configured in time aswe add more rendering plugins).
Last modified 2yr ago