Skip to content

Instantly share code, notes, and snippets.

@forlogos
Created April 5, 2016 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save forlogos/6b64ad6e88885f58e636733640f68aed to your computer and use it in GitHub Desktop.
Save forlogos/6b64ad6e88885f58e636733640f68aed to your computer and use it in GitHub Desktop.
Sublime text macro to take a paragraph, wrap it in <p> tags, and bring it up to stay on the previous line. Must be executed per paragraph. Best when it's binded to a keyboard shortcut
[
{
"args":
{
"by": "lines",
"forward": false
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": true
},
"command": "move"
},
{
"args":
{
"by": "characters",
"forward": true
},
"command": "move"
},
{
"args":
{
"to": "line"
},
"command": "expand_selection"
},
{
"args":
{
"by": "words",
"extend": true,
"forward": false
},
"command": "move"
},
{
"args":
{
"name": "Packages/XML/long-tag.sublime-snippet"
},
"command": "insert_snippet"
},
{
"args":
{
"extend": false,
"to": "bol"
},
"command": "move_to"
},
{
"args": null,
"command": "left_delete"
},
{
"args": null,
"command": "left_delete"
},
{
"args":
{
"by": "stops",
"empty_line": true,
"forward": true
},
"command": "move"
},
{
"args":
{
"by": "lines",
"forward": true
},
"command": "move"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment