shotcut给sublime添加快捷键

Sublime官方文档:http://docs.sublimetext.info/en/latest/customization/key_bindings.html

From : https://forum.sublimetext.com/t/how-to-set-shortcut-for-menu-view-word-wrap/5278/2

Hello.

I've tried to set shortcut to menu "View => word Wrap" and I've failed.
I'd like to switch between "word Wrap" * *on/off within keys **ctrl+t+w.
I've opened "Preferences => Key Bindings - User" and here is conent:
[code]

{ "keys": "ctrl+t+w"], "command": "toggle wordWrap" }
]
[/code]

I've saved this settings with ctrl+s
Then I've opened my txt file containing long strings and I've tried to use ctrl+t+w.
There were no effect.
What is the problem?
How can I bind chortcut ctrl+t+w to menu item **"word Wrap" **?

  1. I don't think you can use "t" as a modifier key. As far as I know, only "ctrl", "shift", "alt", and "meta" can be modifier keys.

2.Your command would not work anyways; "toggle wordWrap" is not a command.

  1. Do this (change shortcut to what you want only using accepted modifier keys; this is tested, and does work):

 

    { "keys": ["ctrl+shift+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"}}
posted on 2016-04-04 11:50  阿卡贝拉  阅读(217)  评论(0)    收藏  举报