Sublime Forum

Can I assign a shortcut for word wrap?

#1

Cannot find related command, seems it can only be configured in settings or view->word wrap

It’s useful when temporary toggling this to view some lines

0 Likes

#2

So it looks like you don’t know how to find what a menu item triggers.

  1. Enter sublime.log_commands(True) in ST console
  2. Do view->word wrap
  3. You see toggle_setting {"setting": "word_wrap"}
  4. You add { "keys": ["MY_KEY"], "command": "toggle_setting", "args": { "setting": "word_wrap" } },

Another way, sure, look into the source code of the menu.

0 Likes

#3

Thanks! This log_commands is really helpful!

0 Likes