有没有人知道Sublime Text 2边栏的“上下文”,或者知道如何查找上下文?
我在Vintage模式下使用Sublime Text 2,并且几个自定义键绑定(和VintageEx)很少离开主行。在没有指定上下文的情况下重新绑定'j','k'和喜欢的内容会在编辑窗口中继续插入模式,以便有移动而不是键入j或k。更具体一点,任何关于应该取代什么的想法'???'在此映射中:
{ "keys": ["j"], "command": "move", "args": {"by": "lines", "forward": true} , "context": [{"key": "???"}] }
使用'j'代替侧边栏中的向下箭头?
非常感谢!
答案 0 :(得分:10)
你走了。只需将其添加到您的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"} ]
}
希望有所帮助!