Perform structural search and replace in bulk - resharper

In an existing code base, the call to parse dates depends on the machine's culture. I created a custom resharper search/replace pattern that can spot and fix these calls.
Is there a way quickly find and fix all the hits of this search replace pattern? I'm now doing them one by one and it's going to take forever ...

Isn't the 'Global Fix' at the end of that very blog post you link to exactly what you want?
Global Fix What we’ve just done is a manual local fix,
that is, locate the offending entry and hit Alt+Enter to apply a
QuickFix. We can do this at a global scope by using the
Pattern Catalog tool window.
1. Undo the prefix fix (so as to have several instances) 2.
Open up the Patterns Catalog 3. Select the
recently created Pattern and click on Search now.
This time, instead of the Find Results dialog, we get a Replace dialog
which displays all matching patterns and a Replace
button
4. We can select
the entries we want replacing (by default all checked). Click
Replace We’re done! ReSharper will now
replace all occurrences. So we’ve applied a QuickFix
globally.

Related

Sublime Text 3 Project

I am trying to use sublime for editing and making rainmeter skins, I have installed a plugin that recognizes rainmeter code nice.
In my code I have an #include=\somelocation...
at that location the file has things like colour=something
In the actual file being loaded fontColor=#colour#
How do I get it so that if I change the name of colour inside the location file it would update everywhere else?
You can use the Find in Files... functionality, located in the Find menu. In the Find: box, enter what you'd like to look for (the buttons to the left allow you to search by regex, respect capitalization, and other options - just mouse over for a description). In the Where: box, enter where you'd like to search. If nothing is entered, the search will run in all open files and folders. Click on the ... button for some extra options. Finally, enter what you'd like to replace the found values with (if anything, you can also use this dialog to simply search files).
Clicking Find will first perform the search for you, so you can verify its results. Clicking Replace will do all the replacements.

Visual Studio hot key - switch Find context/location

Is there a hot key to toggle the search context/location in the "Find"/"Find in Files" commands (Ctr+F and Shift+Ctrl+F respectively )? I'm talking about the drop down that asks where to search for example Current Project, Current Document, Entire Solution etc.
"Find" is probably my most used feature since working with markup and CSS very often I can't just F12 to a selector definition or Shift+F12 to Find Usages, a regular text search is really the only option and I want to make this as efficient as possible.
Yes, I can tab to it but this takes 6-tabs and if I do it fast, often get the count wrong and prematurely execute bad searches; so it's not cutting it.
If there isn't a hotkey how can I set one? Ctrl + F3 would work well since F3 is "Find Next"
Thanks
I'm not sure if there is a command in Visual Studio that does what you are looking for.
If there is one, you can set the shortcut key in the Tools\Options menu (Environment\Keyboard).
In the screenshot, I'm searching for all the VS command that contain "find". Perhaps one of these is what you need.
Then move to the Press shortcut keys textbox and choose your desired key binding.

How to force IntelliJ to always search in "Whole Project"

I like to use the Find in Path function CTRL+SHIFT+F, that searches for text strings in several files.
One thing I often run into though, is that I search for something that I know exists in at least one file, I get zero results or I find just some of the files that contain the search term.
Then I realise that the Scope setting in the Find Dialog box has been set to Module or Directory for some reason rather that "Whole project" which is what I almost always want.
What fools me here is that this only seems to happen occasionally - often I'll have the scope set to Whole project like I want to, but sometimes it will be something else.
How does IntelliJ decide which scope to use?
Also, is there some setting that can be used to force IntelliJ to always select "Whole project" as the default?
Just collapse the project tab before: Command + 1 or Alt + 1
The default selection depends on the context which launched the search. If you have the project tab open with a folder/file selected it will search in that folder or the parent of that file.
To search by default just close that panel (this will make the context be the whole project) and press the search shortcut and it will be scope properly.
Not really a solution, but how to avoid using the mouse for this:
When the dialog is open, press Alth before pressing enter. This will cause the scope to be set to Whole project.

jsTree plugin renaming error when renaming more than one item

I have a problem with the jsTree plugin crrm when I try to rename more than one item in the tree.
Problem: When I rename more than one a white box appears over the name and I can't see what I'm typing any more. This doesn't happen the first time.
The length of the "white box" that covers it is the length of the current node name. I can see my typing if I type past the length of the box as it'll appear on the right.
And the change will work - but I can't see it when I'm typing.
Anyone know what's up?

Tab behavior Resharper Intellisense Options

A product like Resharper has many settings, and I can't seem to find the right settings to get the exact behavior I desire from it.
The behavior I am trying to change is this:
Suppose the endresult I want is
but the line currently is
As you expect I start typing:
and after a tab I get this
but I wanted it to become
Does anyone know how I can change the Resharper settings in such a manner that my desired behavior is realized?
Thank you.
EDIT: Note that tab does perform the desired behavior in the default VS Intellisense.
In this particular case, here's what you should do:
Go to ReSharper > Options > Environment > IntelliSense > IntelliSense Behavior, and set Automatically insert parentheses after completion to Opening only.
Now, with the caret right before SomeMethod(), type in Math.Ab, and complete Abs with Enter, as correctly suggested by Rob H. You'll end up with Math.Abs(SomeMethod();
Finally, press Ctrl+Shift+Enter to invoke the Complete Statement, which in this case will insert the required parenthesis at the end of the statement, and put the caret on the next line.
Keep in mind though that this might not be the optimal solution provided that you probably have plenty of other usages of code completion that could conflict with this kind of settings change.
If that kind of similar code modification is required in multiple places, you should possibly create a search and replace pattern instead.
Hitting Enter instead of Tab will insert without overwriting, although you then end up with
Math.Abs()SomeMethod();

Resources