Skip to content

Conversation

@ananthakumaran
Copy link
Owner

see microsoft/TypeScript#18351 for details. This is backward compatible if renameLocation is not present it won't do anything. To test it locally, you need to use release-2.5 branch of TypeScript

if renameLocation is available, automatically trigger the rename command
after the code edits are applied
@josteink
Copy link
Collaborator

josteink commented Sep 24, 2017

I haven't tested it yet, but looking at the code, and the TypeScript-issue that all seems to make sense to me. Looks like a good improvement.

I'll check it in more detail tomorrow.

Edit: tomorrow tomorrow. Was a busy day at work :)

@ananthakumaran
Copy link
Owner Author

no need to hurry, take your time.

@josteink
Copy link
Collaborator

Tested and works. Commit away!

One comment only, and that's really orthogonal to this PR...

The more I use tide-refactor, the more I feel it's a stepping-stone I'd rather not use.

In Visual Studio and other editors, I have direct keys for specific refactorings. Some examples: Ctrl-R Ctrl-R for symbol-rename, Ctrl-R Ctrl-M for method-extraction, etc.

I very often know what I want, and I'd like to just get right to it without asking my editor if it's actually an option, because I can tell up front it should be.

Should we add some extra tide- commands to apply known refactorings directly without having to use tide-refactor as a stepping-stone?

@ananthakumaran ananthakumaran merged commit caecaa5 into master Sep 27, 2017
@ananthakumaran
Copy link
Owner Author

Should we add some extra tide- commands to apply known refactorings directly without having to use tide-refactor as a stepping-stone?

Yes, we could. It still going to ask about which scope you want to extract the method etc, but in many cases, the operation could be carried away without confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants