Sublime Text 2 sidebar context: Vim-like key bindings for sidebar navigation

Does anyone know the β€œcontext” for the Sublime Text 2 sidebar, or have any idea how to find the context?

I use Sublime Text 2 in Vintage mode, and along with a few custom key bindings (and VintageEx) I rarely have to leave the home line. Re-bind "j", "k", etc. Without specifying the context, it is transferred to Insert mode in the editing window (s), so there is movement, not j or k input. To be more specific, any thoughts on what should replace "???" in this mapping:

{ "keys": ["j"], "command": "move", "args": {"by": "lines", "forward": true} , "context": [{"key": "???"}] } 

use 'j' instead of down arrow on sidebar?

Many thanks!

+7
source share
1 answer

Here you go. Just add this to your Preferences-> Key Bindings-User.

 { "keys": ["h"], "command": "move", "args": {"by": "characters", "forward": false}, "context": [ {"key": "control", "operand": "sidebar_tree"} ] }, { "keys": ["j"], "command": "move", "args": {"by": "lines", "forward": true}, "context": [ {"key": "control", "operand": "sidebar_tree"} ] }, { "keys": ["k"], "command": "move", "args": {"by": "lines", "forward": false}, "context": [ {"key": "control", "operand": "sidebar_tree"} ] }, { "keys": ["l"], "command": "move", "args": {"by": "characters", "forward": true}, "context": [ {"key": "control", "operand": "sidebar_tree"} ] } 

Hope this helps!

+10
source

All Articles