Ronny Haryanto

That crazy web developer guy from Melbourne, Australia.

Ronny's Notebook: thoughts, experiments & other nutty bits.

Move by Paragraphs in Sublime Text 2 Vintage Mode

Update: it’s now included in build 2139.

Vintage Mode in Sublime Text 2 is getting better and more usable for me with build 2126. One of the things that I use a lot in Vim that is still missing is moving by paragraphs (using { and }). Since the vintage mode is implemented mainly as Python scripts and key bindings, it’s relatively easy to add new ones. Here are the key bindings for moving by paragraphs:


    { "keys": ["{"], "command": "set_motion", "args": {
        "motion": "move",
        "motion_args": {"by": "stops", "word_begin": false, "sub_word_begin": false, "punct_begin": false, "empty_line": true, "forward": false, "extend": true }},
        "context": [{"key": "setting.command_mode"}]
    },
    { "keys": ["}"], "command": "set_motion", "args": {
        "motion": "move",
        "motion_args": {"by": "stops", "word_begin": false, "sub_word_begin": false, "punct_begin": false, "empty_line": true, "forward": true, "extend": true }},
        "context": [{"key": "setting.command_mode"}]
    }