Replacement with a Vim image of the col and semicolon in Sublime Text 2

advertisements

I'm looking to swap the colon and semi-colon keys in Sublime Text 2 (using vintage mode). Ideally, I'm aiming to recreate the following vimscript behavior:

cnoremap ; :
nnoremap ; :
nnoremap : ;

However I've been searching the Sublime Text docs and have been unable to find the correct command to trigger the remapping of keys. Does such a command exist? What would be the most succinct way to express these commands?


Add the following to Preferences -> Key Bindings -> User

  { "keys": [";"], "command": "show_overlay", "args": {"overlay": "command_palette", "text": ":"},
    "context": [{"key": "setting.command_mode"}]
  },

  { "keys": [":"], "command": "set_repeat_move_to_character_motion",
    "context": [{"key": "setting.command_mode"}]
  }

This will override the default values set in ./Packages/Vintage/Default.sublime-keymap. Hope this helps.