Programs » Sublime Text

End a Line with Separators

To add a shortcut to end a line with separators [: ; , .] use these steps:

1. Tools -> Record Macro (Ctrl+Q).

2. Press End in a line and type a separator.

3. Tools -> Stop Recording Macro (Ctrl+Q).

4. Tools -> Save Macro.

5. Preferences  -> Key Bindings -> User.

6. Add the line

{"keys": ["<shortcut>"], "command": "run_macro_file", "args": {"file": "Packages/User/<macro-name>.sublime-macro"}}

End line with semicolon macro (end-semicolon.sublime-macro)

      "extend": false,
      "to": "eol"
    "command": "move_to"
      "characters": ";"
    "command": "insert"

The keyboard shortcut

{"keys": ["ctrl+;"], "command": "run_macro_file", "args": {"file": "Packages/User/end-semicolon.sublime-macro"}},

Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>