In Editor: Ctrl+F find box, config to search only on Enter? - visual-studio

In VS2013, I find it irritating that it jumps wildly through the current source file to places matching my incomplete entry, while I am typing - I would prefer if it did nothing at all until I completed my entry and hit Enter (and if it finds nothing, the scroll position in the file will not be changed).
I couldn't find an option under "Tools/Options..." that looks like it helps there.
Is it possible to do this?

No, there is no user setting for that, sadly.
Instead, however, consider using SHIFT CTRL+F (find in files). Not the obvious choice, but I've started to prefer it as it gets rid of the leaping about and it can anyway be useful to see the list of occurrences before losing scroll position (whether or not it finds anything).

Related

Force Visual Studio to find from cursor

Just upgraded to VS 2019... and by default (in this and previous versions)... if I search within a document, every subsequent search I make for the same text searches relative to the previous find result... not where I reposition the cursor. I know it is possible to reset the search by moving the cursor... but how? The setting is frustratingly elusive... and not being able to rely on finding the first result after a specific point without first searching for something else, then what you actually want to find, is doubly frustrating! :-(
In this situation, unable to fight design, it might be better served to take a different way of looking/thinking and use CTRL F to do a "find all" into a search results dialog. Then instead move around the Find Locations as needed.
Otherwise you would need to cancel the initial search and restart the search after moving the cursor to the new location.

Is there a way to make the Quick Find dialog wait until you hit enter to find results in Visual Studio 2015?

When I'm trying to search for something in the current document, I think it's really annoying that VS immediately starts trying to find a match when I've only typed a single character. The document ends up jumping all over the place, causing me to lose my spot. Is there any way to make it so VS doesn't start looking for results until I actually hit enter?
You could just use the find and replace dialog instead of quick find. ctrl+shift+F or Edit > Find And Replace > Find in Files. Then just switch the dropdown to current document. Although this creates a list that you can click through rather than navigating directly.

Sublime Text 2—Quickly find something on a page

I've been trying out Sublime for the past few days. Long-time TextMate user.
The one thing I struggle with most is finding stuff in a document. I can use CMD+r to find a selector, but what if I'm looking for something else, a comment maybe, or something else?
If I use CMD+f, Sublime will put a box around all of the instances of my search term, which isn't what I want either. Worst, it keeps a box around all of the instances:
http://cl.ly/1T3x0i2L0j2u1a0E0M12.jpg
I need to "disengage" the find before I can move on.
Is there a TextMate "QuickFind" (Ctrl+s) equivalent in Sublime Text?
I find searching/navigating through a document in Sublime to be really, really frustrating.
After looking for a very long time, I've found it. The Sublime equivalent to Textmate's quick search/find is Find > Incremental Find, or cmd+i.
Now, I'm officially a Sublime convert.
Worst, it keeps a box around all of the instances (see screenshot: http://cl.ly/1T3x0i2L0j2u1a0E0M12). I need to "disengage" the find before I can move on.
To disengage find in sublime text 2 just press Esc key.
On top of using Find as per usual, if a find is for a small amount of characters that would appear 50 times on a page, use the EasyMotion plugin which does that old Vim deal:
You hit the EasyMotion key, hit the character you want to match, then Sublime replaces all visible instances of that character with a letter, number, etc - you then hit that replacement character on your keyboard and the cursor moves to that particular instance of the character you wanted. It's a bit confusing to explain but basically, it lets you teleport to absolutely arbitrary points on any page in 3 key presses.

Fastest way to "jump back" to a file in TextMate?

Often, when I am reading code or debugging, I want the ability to quickly jump around files. I especially want to "go back" to where I was. I know about "Command+T", "Command+Shift+T", and, bookmarks. But, I cannot figure out a way to jump around files quickly.
UPDATE: I do not think I my question was clear enough judging by two answers given. Specifically, I am looking for a way to "jump back" to where I was in a file. I know how to navigate in TextMate (in general). I want to know if TextMate has a "jump back" key binding.
It's subtle.
The command-T thing has the files listed in Most Recently Used order.
So, you can go command-T return to get back to your last file real quick. At first I couldn't find it either.
I don't think there's a go to last edit location as there is in, say, IDEA/RubyMine.
Courtesy of MacroMates.com
2.3 Moving Between Files (With Grace)
When working with projects there are a few ways to move between the open files.
The most straightforward way is by clicking on the file tab you need. This can also be done from the keyboard by pressing ⌘1-9, which will switch to file tab 1-9.
You can also use ⌥⌘← and ⌥⌘→ to select the file tab to the left or right of the current one.
It is possible to re-arrange the file tabs by using the mouse to drag-sort them (click and hold the mouse button on a tab and then drag it to the new location). This should make it possible to arrange them so that keyboard switching is more natural.
One more key is ⌥⌘↑ which cycles through text files with the same base name as the current file. This is mainly useful when working with languages which have an interface file (header) and implementation file (source).
When you want to move to a file which is not open you can use the Go to File… action in the Navigation menu (bound to ⌘T). This opens a window like the one shown below.
Go To File
This window lists all text files in the project sorted by last use, which means pressing return will open (or go to) the last file you worked on. So using it this way makes for easy switching to the most recently used file.
You can enter a filter string to narrow down the number of files shown. This filter string is matched against the filenames as an abbreviation and the files are sorted according to how well they match the given abbreviation. For example in the picture above the filter string is otv and TextMate determines that OakTextView.h is the best match for that (by placing it at the top).
The file I want is OakTextView.mm which ranks as #2. But since I have already corrected it in the past, TextMate has learned that this is the match that should go together with the otv filter string, i.e. it is adaptive and learns from your usage patterns.
If you have a project window open, you can leave frequently-accessed files open (in tabs), and then use ⌘+1-9 to jump to open tabs.

Is it possible to disable command input in the toolbar search box?

In the Visual Studio toolbar, you can enter commands into the search box by prefixing them with a > symbol. Is there any way to disable this? I've never used the feature, and it's slightly annoying when trying to actually search for something that you know is prefixed by greater-than in the code. It's particularly annoying when you accidentally search for "> exit" and the IDE quits (I knew there was a line in the code that was something like if(counter > exitCount) so entered that search without thinking).
At the very least, can you escape the > symbol so that you can search for it? Prefixing with ^ doesn't seem to work.
This is a really cool feature. I've poked through the feature documentation, and the accompanying command list, and not a heck of a lot is showing up in terms of turning it off.
If you want to search for >exit, you could always type >Edit.Find >exit in the search box; that seems to do the trick. A bit verbose, though, but it really is an edge case.
you can enter commands into the search box by prefixing them with a > symbol.
Wow, I didn't know that. Where do I find the list of possible commands?
I never actually use the search box, I've remapped ctrl+F to incremental search, which is usually ctrl+I
I find this much cooler than the normal search - give it a go, you might end up not caring about the search box anymore.
Wow, I didn't know that. Where do I
find the list of possible commands?
The commands are the same as those you can enter in the command window, so you can pretty much drive the entire IDE and debugger using it. There are a load of predefined aliases for common commands. Open up the command window and enter alias for a list, to get you started.

Resources