3

I'm trying to configure ST3 keybindings to reindent whole text, save file and refresh the browser on ctrl+s. I'm using Chain of Command and Browser Refresh plugins, but the problem is I don't know how to pass commands with arguments, so that the reindent command would affect whole text instead of one line only. "single_line" : false seems to be ignored.

"keys": ["ctrl+3"], 
    "command": "chain", 
    "args": {
        "commands": [
        ["reindent",{"context": "window", "args": {"single_line": false}}],
        ["browser_refresh"]
        ]
    }

1 Answer 1

3

I've made it.

"keys": ["ctrl+s"], 
    "command": "chain", 
    "args": {
        "commands": [
        ["reindent",{"single_line": false}],
        ["browser_refresh"]
        ]
    }
1
  • 1
    Looks like you found a solution. Thought I'd mention that you may run into issues in the future as the plugin runs everything as a window command. I cleaned up some work from a post on the ST forums and created a plugin. github.com/skuroda/ImprovedMacros. It doesn't do everything I want it to yet, but it supports running multiple commands, from a user specified context (window, view, or application).
    – skuroda
    Apr 26, 2014 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.