I'm using Typescript and Visual Studio 2015 with Resharper 9. Lets say I want to rename my angular controller method from activate to init. What happens is that Resharper start searching through all suspicious references in libs like angular.js, jquery.js and so on. It also scans all razor views to find possible usages. This operation some times is really slow and is not logical because I will never want to rename something in angular.js library. How can I skip such files from scanning at all?
Select Edit > Refactor > Rename. Right-click the code and select Rename.
Press Ctrl+Shift+R and then choose Rename. Right-click and choose Refactor | Rename from the context menu. Choose ReSharper | Refactor | Rename… from the main menu.
Press Ctrl+Shift+R and then choose Rename. Choose Refactor | Rename from the main menu.
In Resharper 2016.3 JetBrains have introduced Third Party Code. This allows to completely ignore folders or pattern-matched files for JS libraries.
I've tried and this indeed ignores excluded files for scan on renames.
However I'm not entirely sure why they have added yet another location where to specify ignored files. They already had Elements to Skip in Code Inspection => Settings and in Environment => Search & Navigation
UPDATE through this screen you can't exclude files/folders that are not part of the VS solution. There is a bugreport to that effect. Please vote and comment there.
According to the comments here https://www.jetbrains.com/help/resharper/2016.1/Refactorings__Rename.html it is not possible to exclude specific files or filemasks. It has been asked for, though.
Update: With the release of ReSharper 2016.3 it is now possible to exclude folders, specific files and filemasks. Please see trailmax's answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With