# 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.

### Setup

#### 1. Install the Editmode Plugin using Package Control

#### 2. Set your authentication credentials

* Every open directory in Sublime is seen as a project. In order to

  apply project specific settings, you need to save the existing open

  project: `Project -> Save Project As`
* I would recommend saving the project file in the directory you would

  like the settings to apply to.
* Once the .sublime-project file is saved, open it and add the correct

  path 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}') %>"
    }
  }
}
```

#### 3. Open the project

* Close the current folder or files in Sublime, then hit "Project ->

  Open Project" and open the project you just saved.

## Usage

{% hint style="info" %}
&#x20;Select a piece of text and hit `cmd + shift + L` in any open file inside a configured Sublime project.
{% endhint %}

* The em\_authentication\_token identifies the Editmode project where

  the chunk will be saved to. You can find this in your Editmode

  account.
* The plugin adds a keyboard shortcut (CMD+SHIFT+L) which you can use

  with any open file in a project where you have already specified

  your em\_authentication\_token.
* Select the text you'd like to replace, then hit the keyboard

  shortcut, and Sublime will send the text to the configured Editmode

  project, and add a view helper in it's place. (Currently this uses

  the rails view helper syntax, but this can be configured in time as

  we add more rendering plugins).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://editmode.gitbook.io/editmode-docs/editmode-plugins/editmode-for-sublime-text.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
