5

I have installed the Filter Lines plugin (Windows OS) but I can't figure out if it is possible to have a keyboard combination for the Edit > Code Folding > Fold With String as I cannot find the default keyboard combination ctrl+k ctrl+s in the Key Bindings - Default?

If this is not possible, can anyone then refer to another filter plugin, which (ideally) realtime filters the text, so I can edit all the lines in one go?

I want keyboard shortcuts for the Code Folding lines:

I want keyboard actions for the Code Folding stuff

4

2 回答 2

6

只需查看插件源,您就会知道要作为快捷方式运行什么命令。如果命令类的名称为FoldToLinesCommand,则快捷方式文件中的命令名称为fold_to_lines.

另一种解决方案是打开 Sublime 控制台,然后输入

sublime.log_commands(True)

这将在控制台中记录所有命令。之后,您只需将所需的命令作为快捷方式运行,查看控制台输出并将其写入您的键绑定文件。完成后不要忘记禁用命令日志记录以避免无用的输出。

于 2013-10-04T07:28:14.390 回答
1

作为额外插件的替代品,我目前正在使用 Sublime 自己的折叠快捷方式。请注意,例如,在选择单词或行时,您只会折叠所选的字符串。

ctrlshift[快捷方式可用于折叠代码块。当然,展开可以使用相关的ctrlshift]快捷键来完成。

这些快捷键在默认 Sublime 键盘映射中定义,fold如下unfold所示。

{ "keys": ["ctrl+shift+["], "command": "fold" },
{ "keys": ["ctrl+shift+]"], "command": "unfold" },

希望这可以帮助你。

于 2014-10-15T17:18:23.903 回答