Skip to content

Instantly share code, notes, and snippets.

@harthur
Created September 24, 2012 10:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save harthur/3775349 to your computer and use it in GitHub Desktop.
Save harthur/3775349 to your computer and use it in GitHub Desktop.
Sublime Text keyboard shortcut for inserting dump() for Firefox JS dev.

Go to Sublime Text 2 > Preferences > Key Bindings - User and add this JSON to the file:

[
    { "keys": ["super+shift+o"],
      "command": "insert_snippet",
      "args": {
        "contents": "dump(${1:} + \"\\n\");${0}"
      },
      "description": "insert a dump() call at the cursor, tab once to jump past"
    }
]

Inserts a dump() at the current cursor position and appends a + "\n" after the cursor to add a newline to your output.

Tab once to jump past the entire statement after filling it in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment