junichi11 / netbeans-php-cs-fixer-plugin

Support for PHP CS Fixer
https://plugins.netbeans.apache.org/catalogue/?id=36
Apache License 2.0
26 stars 4 forks source link

Add the ability to bind php cs fixer to a keymap (shortcut) #7

Closed lakhman closed 10 years ago

lakhman commented 10 years ago

Currently the only way I can find to run php cs fixer is using the mouse and right clicking on the file and selecting php cs fixer > Fix.

It would be great if you could add the php cs fixer application to the keyboard shortcuts list in netbeans (Keymap) so I could bind keyboard shortcuts to it.

I would suggest 2 entries for the keyboard shortcut.

  1. php cs fixer --dry-run
  2. php cs fixer --fix

So I could map them to something like CMD + SHIFT + CS (dry run) & CMD + CS (to fix) - or whatever the user prefers.

You probably know what I mean already, but I have attached a screenshot anyways!

screen shot 2014-06-25 at 14 52 03

p.s: I love all your netbeans plugins!!! they are FREAKING AWESOME!! ;)

Thanks!! :+1:

junichi11 commented 10 years ago

Done ;)

Note:

We must set shortcut keys for fix commands manually. i.e. I didn't register default shortcut keys.

lakhman commented 10 years ago

Thanks!, this works as expected! HUGE time saver!!

I manually assigned: Ctrl + Meta + F = Fix Ctrl + Meta + R = Dry Run

I think assignment should be left up to the user and not the plugin, blank as default shortcut key is perfect.