Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 3 and Filter Lines plugin - need keyboard shortcut for Code Folding

Tags:

sublimetext3

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

like image 834
Beauvais Avatar asked Oct 04 '13 06:10

Beauvais


People also ask

How do I move multiple lines in Sublime Text?

You can use Ctrl and Alt with this too. Shift+Right mouse button is an alternative way to initial a column select. Dragging in the gutter (where the line numbers are), will select entire lines at once.

How do I insert multiple lines in Sublime Text 3?

To add single-line comments, put the text cursor on the line to comment-out or highlight multiple lines and type CMD + / on Mac, for Linux and Windows use CTRL + / .


1 Answers

Just look at the plugin source and you will know what command to run as shortcut. If the name of the command class is FoldToLinesCommand, the command name in the shortcut files will be fold_to_lines.

Another solution is to open Sublime console, and enter

sublime.log_commands(True)

this will log all the commands in the console. After, you just have to run the command you want as a shortcut, look at the console output and write it in your key bindings files. Do not forget to disable command logging when you are done to avoid useless output.

like image 77
Daniel Perez Avatar answered Nov 15 '22 08:11

Daniel Perez