benmatselby / sublime-phpcs

🔍 PHP CodeSniffer, PHP Coding Standard Fixer, Linter, and Mess Detector Support for Sublime Text
Other
811 stars 127 forks source link

Toggle warning panel by shortcut? #199

Closed notrealdev closed 11 months ago

notrealdev commented 3 years ago

Hi, how can i toggle warning panel by using shortcut? I follow this document but cant found it.

The shortcut toggle this popup, please check my image here:

Imgur

benmatselby commented 3 years ago

So defining something like

{ "keys": ["super+k", "super+f"], "command": "phpcs_fix_this_file", "args": {"tool": "CodeBeautifier"}},

In your key bindings config didn't work?

notrealdev commented 3 years ago

No, i dont want to fix it, just show warning panel. Can you consider adding new command like phpcs_show_warning_panel? // Or how can i add my custom command?

benmatselby commented 3 years ago

Hey.

So to show the warning panel, you will need to sniff the file, which takes you back to the comment above. I may have misunderstood otherwise.

notrealdev commented 3 years ago

Oh, i have phpcs settings like this:

"show_debug": true,
"extensions_to_execute": ["php","js"],
"extensions_to_blacklist": [],
"phpcs_execute_on_save": true,
"phpcs_show_errors_on_save": true,
"phpcs_show_gutter_marks": true,
"phpcs_outline_for_errors": true,
"phpcs_show_errors_in_status": true,
"phpcs_show_quick_panel": false, // Set to fasle.
"phpcs_php_prefix_path": "",
"phpcs_commands_to_php_prefix": [],
"phpcs_icon_scope_color": "comment",
"phpcs_sniffer_run": true,
"phpcs_command_on_save": true,

I just want to actively display quick panel via shortcut, not by default when save.

benmatselby commented 3 years ago

So I believe you will need:

{ "keys": ["super+k", "super+f"], "command": "phpcs_fix_this_file", "args": {"tool": "CodeBeautifier"}},

In your keymap. This will then allow you to run a shortcut to sniff the file and give you the results.

notrealdev commented 3 years ago

Yep, i will try

benmatselby commented 11 months ago

Hey @notrealdev. I'm closing this down due to inactivity. If this still isn't working, please re-open the issue 😄