![]() ![]() Like before, you can use “Ctrl + Shift + F3” to perform a reverse search if you so choose, to search backwards within the document. Pressing “Ctrl + F3” will search for the next instance of the text you have highlighted – allowing you to avoid having to type it: Ctrl + F3 - Find Using Current SelectionĪnother neat searching trick that you can use to avoid having to type your search term is to simply highlight a word (or part of a word) within the code editor, and then press “Ctrl + F3” to search for the next usage of it within the current file: You can easily toggle using F3/Shift+F3 to search forward and backwards within your document. Pressing “Shift + F3” will do a reverse search (from the current cursor location in the editor) of the last search term used. Just press F3 and you’ll repeat the last search (in this case “action”) from that new point in the document – no need to re-type it. This is particularly useful for scenarios where you search for something, make a code change, and then want to continue from that point in the code. You can always press the F3 key within Visual Studio to repeat the last performed search at a later point. The search term you used will show up within the “find” drop-down within the VS "standard toolbar: One neat tip to know about incremental search is that after you press the ESC key to escape out of it, it will add the term you searched for to the find stack within the IDE. F3 and Shift+F3 – Find Using Previous Search Term ![]() More details on incremental search can be found here. You can press the “Esc” key at any point to escape out of incremental search. Pressing “Ctrl + Shift + i” will reverse direction on the search, and allow us to skip backwards. We can then press “Ctrl + i” again to find the next usage of the same term (and continue this repeatedly): This will subtly change your cursor, and cause your status bar at the bottom left of the IDE to change to “Incremental search: (search term)” – you can then type the search term you are searching for and the editor will search for it from the current source location you are on (no dialog required).īelow we did an incremental search for the term “action” and VS highlighted the first usage it found within the file: To enable incremental search, just type “Ctrl + i” within the editor. This enables you to search within your current document, and enables you to do so without having to bring up a dialog. A surprisingly large number of developers, though, aren’t familiar with the “Incremental Search” capability within Visual Studio. ![]() Most developers using Visual Studio are familiar with the “Find dialog” that you can launch by pressing the “Ctrl + F” key within the IDE. They are all easy to learn, and can help save you a bunch of time. Hopefully this post will help you discover them if you aren’t already taking advantage of them. These tips were ones that my friend Scott Cate (who has blogged dozens of great VS tips and tricks here) recently recommended to me as good tips that most developers using Visual Studio don’t seem to know about (even though most have been in the product for awhile). Today’s blog post continues on from the Debugging Tips post I did last week, and covers some useful searching and navigation tips/tricks you can take advantage of within Visual Studio. This is the twenty-seventh in a series of blog posts I’m doing on the VS 2010 and. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |