dnatag / PyRefactor

Python refactoring tool for Sublime Text
9 stars 3 forks source link

Keymap #8

Open emanuelvianna opened 8 years ago

emanuelvianna commented 8 years ago

Hi,

First, thanks for providing this nice plugin. It is being very useful.

I'm not sure if you noticed, but it have conflicted with some sublime keymaps:

The idea of overriding the "ctrl+shift+z" could be nice, once it may allow us to roll back a refactor in a single step in a very natural way. But, when there isn't any refactor change in the undo list, it should preserve the standard redo behavior, which is not happening.

The way I turnaround this was changing the keymap as follows:

[
    {"keys": ["ctrl+shift+z"], "command": "redo"},
    {"keys": ["ctrl+shift+n"], "command": "new_window"},
    {"keys": ["ctrl+alt+z"], "command": "refactor_undo"},
    {"keys": ["ctrl+alt+y"], "command": "refactor_redo"},
    {"keys": ["ctrl+alt+n"], "command": "refactor_create_project"}
]

Best, Emanuel

Kristinita commented 7 years ago

+1

@dnatag, see package_reviewer report:

D:\package_reviewer>python -m package_reviewer "D:\Sublime Text 3 x64\Data\Packages\PyRefactor"
Package path: D:\Sublime Text 3 x64\Data\Packages\PyRefactor

## Report for PyRefactor ##############################

Reporting 5 failures:
- `messages` folder exists, but `messages.json` does not
- The binding ['ctrl+shift+z'] unconditionally overrides a default binding
    File: Default (Windows).sublime-keymap
- The binding ['ctrl+shift+n'] unconditionally overrides a default binding
    File: Default (Windows).sublime-keymap
- The binding ['ctrl+shift+z'] unconditionally overrides a default binding
    File: Default (Linux).sublime-keymap
- The binding ['ctrl+shift+n'] unconditionally overrides a default binding
    File: Default (Linux).sublime-keymap

No warnings

For more details on the report messages (for example how to resolve them), go to:
https://github.com/packagecontrol/package_reviewer/wiki

Thanks.