Scott Hanselman

Visual Studio's most useful (and underused) tips

August 17, 2016 Comment on this post [93] Posted in VS2015
Sponsored By

There was a cool comment in my last blog post (one of many, as always, the comments > the content).

Btw, "until I realized that the Solution Explorer tree nodes are searchable." This one is a saver!

The commenter, Sam, noticed a throwaway bit in the middle of the post where I noted that the Solution Explorer was text-searchable. There's a lot of little tricks like this in Visual Studio that even the most seasoned developers sometimes miss. This phenomenon isn't limited to Visual Studio, of course. It's all software! Folks find non-obvious UX all the time in Windows, OSX, iPhone, everyday. If UX were easy then everything would be intuitive but it's not so it ain't. ;)

There's an old joke about Microsoft Office, which is known for having a zillion features.

"Most of the exciting new Office features you discover have always been in Office." - Me and Everyone Else

Here's some exceedingly useful stuff in Visual Studio (It's free to download and use, BTW) that folks often miss.

Search Solution Explorer with Ctrl+;

You can just click the text box above the Solution Explorer to search all the the nodes - visible or hidden. Or, press "Ctrl + ;"

Ctrl ; will filter the Solution Explorer

Even stuff that's DEEP in the beast. The resulting view is filtered and will remain that way until you clear the search.

Ctrl ; will filter the Solution Explorer and open subnodes

Quick Launch - Ctrl+Q

If there is one feature that no one uses and everyone should use, it's Quick Launch. Someone told me the internal telemetry numbers show that usage of Quick Launch in the single digits or lower.

Do you know that you (we) are constantly digging around in the menus for stuff? Most of you use the mouse and go Tools...Options...and stare.

Just press Ctrl+Q and type. Need to change the Font Size?

Find the Fonts Dialog quickly

Want to Compare Files? Did you know VS had that?

Compare Files

What about finding a NuGet package faster than using the NuGet Dialog?


Promise me you'll Ctrl+Q for a few days and see if you can make it a habit. You'll thank yourself.

Map Mode for the Scroll Bar

I love showing people features that totally surprise them. Like "I had NO IDEA that was there" type features. Try "map mode" in the Quick Launch and turn it on...then check out your scroll bar in a large file.

Map Mode for the Scroll Bar

Your scrollbar will turn into a thumbnail that you can hover over and use to navigate your file!

Map Mode turns your Scrollbar into a Scroll Thumbnail

Tab Management

Most folks manage their tabs like this.

  • Open Tab
  • Repeat
  • Declare Tab Bankruptcy
  • Close All Tabs
  • Goto 0

But you DO have both "pinned tabs" and "preview tabs" available.

Pin things you want to keep open

If you pin useful tabs, just like in your browser those tabs will stay to the left and stay open. You can not just "close all" and "close all but this" on a right click, but you can also "close all but pinned."


Additionally, you don't always have to double-click in the Solution Explorer to see what's in a file. That just creates a new tab that you're likely going to close anyway. Try just single clicking, or better yet, use your keyboard. You'll get a preview tab on the far right side. You'll never have more than one and preview tabs won't litter your tab list...unless you promote them.

Navigate To - Ctrl+, (Control+Comma)

Absolutely high on the list of useful things is Ctrl+, for NavigateTo. Why click around with your mouse to open a file or find a specific member or function? Press Ctrl+, and start typing. It searches files, members, type...everything. And you can navigate around with your keyboard before you hit enter.

There's basically no reason to poke around in the Solution Explorer if you already know the name of the item you want to see. Ctrl+, is very fast.


Move Lines with your keyboard

Yes I realize that Visual Studio isn't Emacs or VIM (unless you want it to be VsVim) but it does have a few tiny tricks that most VS users don't use.

You can move lines just by pressing Alt-up/down arrows. I've never seen anyone do this in the wild but me. You can also Shift-Select a bunch of lines and then Alt-Arrow them around as a group.

Move those lines with ALT-ARROW

You can also do Square Selection with Alt and Drag...and drag yourself a nice rectangle...then start typing to type on a dozen lines at once.

Perhaps you knew these, maybe you learned a few things. I think the larger point is to have the five to ten most useful features right there in your mind ready to go. These are mine. What are your tips?

Sponsor: Do you deploy the same application multiple times for each of your end customers? The team at Octopus have been trying to take the pain out of multi-tenant deployments. Check out their 3.4 beta release.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
August 17, 2016 9:20
Very cool tips, I must confess I'm a little bit relieved that I in fact *did* know and use most of them, but the alt-drag-then-type thingy I didn't - and it's soooo convenient! Thanks for that!
August 17, 2016 9:23
I've been using the alt line move trick for a couple of years now, so you're definitely not alone "in the wild". I also use the alt+click-drag to select vertical areas for typing, and have the "multiediting" extension for VS that gives you alt-click to drop multiple cursors throughout a file--replicating your keystrokes in multiple places. Extremely handy.
August 17, 2016 9:33
Thanks much ☺ for the wonderful tips, I never knew about few tips before 😊
August 17, 2016 9:37
Thank you for sharing this, the CTRL+q and CTRL+comma will be of immediate help!

Would have shared my tips like map mode scrollbar, but everything is already in this blogpost... I do hope some can come up with a tip to fully expand 1 node in solution explorer ;)
August 17, 2016 9:40
An additional trick with the map mode, is when you hover over the preview what it shows depends on where you hover.
The closer the cursor is to the actual code, the more detail you see.
If the cursor is all the way on the right you just see an overview of the nesting.
August 17, 2016 9:42
Very cool. I didn't know a few of them so great to learn something new :)

I also recently wrote a similar post on my blog. Surprisingly there aren't too many overlapping tips :) Just the one with Alt + drag. Hope it's ok to link my post
August 17, 2016 9:43
If you prefer to only use the keyboard, you can perform the Alt-Drag editing feature by holding down Alt-Shift and using the arrow keys. It's fun AND fast. :)
August 17, 2016 10:23
Well, after resharper i don`t care about what features vs has :)
August 17, 2016 10:24
CTRL+W to select the current word is so simple, yet one of my favorites. Repeat to expand the selection in a logical way.
I constantly find myself trying to use it in Code and even Word.
August 17, 2016 10:51
You can also use Square Select to in-place edit text, very useful if you want to change post- or prefix characters on multiple variables over multiple lines.

One of your evangelists did this in a demo at an Azure Bootcamp we hosted, and I bet for a few of them this was one of their biggest take-aways of the day :)
August 17, 2016 11:03
I did know about alt+up/down before but I never used it so I forgot about it. Thanks for reminding me! Quick Launch though, never heard of. And it's sitting there basically attached to the minimize button...
August 17, 2016 11:04
Very nice! Love the vertical scrollbar, was always jealous of Sublime for that... Nice additions David Berry, too.
August 17, 2016 11:19
Nice. Especially the CTRL+<comma> is the most using search option for me.
August 17, 2016 11:24
Oooops, sorry. CTRL-W is a R# thing. *blush*
August 17, 2016 11:34
The Alt-<arrow> tip was great I usually did that with the mouse, not any more!

The solution explorer search thing I was a little puzzled why anyone would not know about that given it says right in the box "Search Solution Explorer (Ctrl-;)"

The map mode thing, I tried once, forgot about it, tried it again after reading this and then turned it off again, not that useful for me.
August 17, 2016 11:51
I was very surprised when my girlfriend (a Java programmer) showed me the "Sync with Active Document" button on the solution explorer. It has always been there I just never bothered to check what it does.
August 17, 2016 12:12
My most used shortcut is CTRL+T and CTRL+SHIFT+T for all in one search... Don't know if it's visual studio or ReSharper's feature though ;)
August 17, 2016 12:12
If you're used to Control-Comma (cannot live without it anymore), Control-; becomes somewhat superfluous but it has its use nevertheless.
August 17, 2016 12:13
A nice feature of the map mode scroll bar is that errors from build or static analysis are highlighted on it with red squares. You can click the scroll bar on or next to them to jump straight to where the problem is.

I like using the full screen view (Shift-Alt-Enter toggles it) when I want to focus on coding. It gets rid of everything but the menu bar and tabs. There seems to be a bug with it though. If VS is not maximized it works fine; the Windows taskbar is hidden and VS fills the screen. But if VS is maximized the Windows taskbar remains visible but the height of the full screen VS window is calculated as if it was so a little is cut off top and bottom.
August 17, 2016 12:26
Forgot to ask: do you guys have any issues with lagging behaviors when using Control-Comma?

Often, the first keystroke gets eaten. I.e. "Control-; foo" becomes "oo" typed in the completion thingy. When this happens the screen flashes. After that it's OK for a while but can happen again in the same VS session.

Also, when typing quickly, chars tend to become swapped as the insertion cursor in the completion thingy doesn't catch up quickly enough. So "foo" can be typed in as "ofo" sometimes, or even "oof".

Another annoyance is that the using the mouse on the completion results sometimes selects the wrong file. This happens when using Control-comma as a surrogate for Control-;

Say I want all XYZ.xml files. Control-, XYZ presents DIR1\XYZ.xml ... DIRn\XYZ.xml, clicking on DIR3\XYZ.xml often opens/previews DIR2\XYZ.xml. Using the arrows is fine though.

A part from the annoyances, it's a time-saving feature without which navigating a large solution project becomes quickly undoable and remains an absolutely essential features.

Thanks for that!
August 17, 2016 12:38
Wow!!!! Thanks for sharing.
August 17, 2016 13:03
If you're working on 'enterprise' code where class has an interface. Ctrl+F12 to take you to the implementation is a sanity saver.

My most successful tip has been for SQL Management Studio. You can configure (New Connection Dialog -> Options) different DB connections to show a different colour in the status bar. Green-Dev, Orange-Test, Prod-Red.

Dined out for a week on that one when I showed it to a new team that was struggling to make sure they were in the right environment. It's not mine, a SQL guru showed me once.
August 17, 2016 13:10
I'm a really heavy user of pinned tabs and generally only "close all" tabs when I'm switching between issue branches. You can make it much more usable by turning on "Show pinned tabs in a separate row" - find the option by CTRL+Q, pinned.

I notice from your screenshots that you've got line numbers turned on. That's a setting I always get people to turn on when they ask for my help looking at their code. I can't understand why it isn't turned on by default.

@Mihai Radulescu Resharper is great, but I'd prefer to use built-in features if they are at least as good as those of Resharper, because that way I can still use them if I ever have to use a copy of Visual Studio without Resharper.
August 17, 2016 13:14
@jmrjr - Asterisk '*', it's a windows-wide shortcut for treeviews, so also works on Explorer folders, etc.
August 17, 2016 13:18
My favorite one is paste special. Which allows us to copy json or XML and paste it as a c# class

Edit=>Paste Special=>Paste JSON As Classes
August 17, 2016 13:26
Here's goes another that is specially useful when you are into a new project and trying to find your way around. Sometimes you open a new file/tab and keep moving around the solution explorer it's easy to get lost when you select the tab again and it's location it's not visible in the solution explorer. To "fix" this:

Tools -> Options ->Projects and solutions -> Track Active item in solution explorer

or Ctrl + Q start typing... track

Have fun.
August 17, 2016 13:31
@Marius You can try disabling the preview tab, see if that helps with performance. To do this:
- hit Ctrl + ,
- click on the little arrow on the right of the search box
- at the bottom of the menu, you'll see a "Search options" section
- uncheck the See Preview Tab
August 17, 2016 13:33
Want to Compare Files? Did you know VS had that?
The option visible on the screenshot is just to show the toolbar for comparison. I don't see any option there to literally compare two files (toolbar itself doesn't give that). Am I missing something?
It works seamlessly when using any integrated VCS when committing files or comparing them between commits and that's cool, but has nothing to do with Ctrl-Q which is great by the way.

I like the list anyway, because I like that kind of "hacks" which can make developers life easier. For example I like the fact that you can search for references in Solution Explorer Search. It saved me some time once in the past.
August 17, 2016 13:40
@Ireneusz Patalas Indeed, the option shown in the screenshot only shows/hides the "Compare File" toolbar. If you want to actually see a diff between two files, besides comparing files in your VCS, you can open the command window (Ctrl+Alt+A), and type

> Tools.DiffFiles File1.cpp File2.cpp
August 17, 2016 13:47
Found this the other day - you can define search folder groups to use in the 'find in files' dialog, e.g. a group that excludes resource projects, or vendor provided JS files, or excludes secondary projects and just includes the code project items.
August 17, 2016 13:49
@Paul: thx! That's a good thing to know :)
August 17, 2016 14:30
Dear Mr.Sccot,

May I know why Microsoft has not created an AngularJS 2 template project inside VS.NET ?. We are really need to just create and have a full prepared Hello word App in less than a minute.

August 17, 2016 14:37
Very helpful tips thanks
August 17, 2016 15:16
Visual Studio's Control+Comma and then immediately followed by Control+V does not work.

But Resharper's Control+T and then immediately Control+V does...

So if you want to paste what you want to search, you are out of luck... your only option is to use Resharper.
August 17, 2016 15:24
Funny that, I as a Senior Developer am careless to know all these but co-op students (colleagues) are passionate to use all these and more everyday. I can see they are fast in productivity.

Good post
August 17, 2016 15:30
Thanks for the tips! I knew most of these but have not made a good habit of using them, unfortunately. One thing that your tip on tabs made me think of pointing out is that the Visual Studio Productivity Power Tools include an option for a "Vertical Tab-Well" which, after switching to it, I could never go back. It's so much cleaner and easier to find open files. I also think it's a more efficient use of space but obviously it's personal preference. I highly recommend all VS devs give it a try. I cringe when I get stuck using horizontal tabs!
August 17, 2016 16:00
There's also Search inside Tools -> Options, if you made it as far as to open it before being overwhelmed with confusion. I think we can subtitle this post "my god, it's full of search".

And like Tom, I'm a big fan of the Vertical tab well in the Power Tools. The only things I don't like is that I can't adjust the tab width independently in different splits, or swap one split back to horizontal tabs to minimize dead space if I only have a few tabs open.
August 17, 2016 16:14
My most frequently used

Ctrl-Tab - brings up the window browsing thingy.

F8 - "next thing in the list", where list is whatever has focus - error list, find symbol results etc. SHIFT-F8 to go back one.
August 17, 2016 16:29
A useful shortcut I've learned recently:
ALT + - (dash), opens the context menu of the tab like you right clicked in the tab title.
August 17, 2016 16:32
This is great stuff! I was keeping a list of similar tips at, but probably need to update it for the new stuff in the latest release.
August 17, 2016 16:35
Thanks Scott! The group line move is dope! I'll probably have to pick just one or two and learn them. Ctrl+, seems like it would serve me best. I mostly just Ctrl+F everywhere.

Is there a shortcut to change the search mode to "current document"? A constant tussle is accidentally searching the entire solution when I've set the mode to that in a previous search.

I can't think of any shortcuts to share, I must be all mouse! :)
August 17, 2016 16:47
It's always nice to remember these useful tips.
August 17, 2016 16:49
I'm just waiting for VS Code to support Alt+drag rectangular selection. It always annoys me having to switch to Geany or VS just to edit multiple lines at once!
August 17, 2016 17:56
Good tips. I'm going to give the map mode scrollbar a try.

I know it's not baked into VS by default, but the GoToDefinition VS extension (Ctrl+click to drill into any class/property/method/etc, including JS) I stumbled upon a couple years ago was life-changing for me. I navigate around so much more quickly and efficiently. As a GUI oriented guy I used to right-click, Go to Definition, but this extension allows me to skip by the context menu and/or having to reach up to the F12 key and gives me an intuitive "you're about to navigate here if you click" visual cue while I'm holding the Ctrl key and hovering over various classes, methods, and properties.
August 17, 2016 18:00
I love Alt+up/down and use it all the time, except it has broken every application that is not Visual Studio...I often find myself in SSMS for example trying to figure out why Alt+Up isn't working, haha.

Another tip is that you can select text from multiple lines and then start typing. For example:

Foo.Bar.FirstName = "Bob";
Foo.Bar.LastName = "Smith";

Can be changed to:
Foo.Bar.Person.FirstName = "Bob";
Foo.Bar.Person.LastName = "Smith";

by placing your cursor at Foo.Bar and pressing Alt+Shift+Down and then typing .Person (You'll see .Person being typed on both lines)
August 17, 2016 18:55
Hi Scott,

Just wondering what do you use to record the GIFs like the last one in this article?

August 17, 2016 18:57
I use the Alt-up/down arrows all the time. It's my favorite feature!
August 17, 2016 19:13
A tip for getting to a tip: right-click your code window scrollbar to easily navigate to the scrollbar options.
August 17, 2016 19:34
@Liam, I don't know what Scott uses. But I use ScreenToGif. I've tried quite a few Gif maker/capturers and this is the best (free) one I found.
August 17, 2016 21:24
This is really cool. I never knew some of the features mentioned existed in ( especially the column edit ) by VS.
August 17, 2016 21:26
Great post Scott! I love the "Map Mode" for the scroll bar. One other really nice feature, which I found totally by accident when trying your "MOVE LINES WITH YOUR KEYBOARD", is that without selecting anything and pressing Alt+Down or Alt+Up it will scroll to next/previous property defined in your class. Pretty nifty!
August 17, 2016 21:29
CTRL+K+D to layout-format your code (if you get it from somewhere else, or a template with weird indentation or something)

and the edit - paste special option to paste JSON or XML on the clipboard as C# classes... that was a cool surprise when someone showed me that!
August 17, 2016 22:02

I discovered this fairly recently and use it ALL THE TIME now to reorganize my code. It's super handy when combined with collapsible code when you want to quickly rearrange the order of the members in a big class.
August 17, 2016 22:29
@Alistair Chapman
vs code has vertical editing (ctrl+alt+shift+ up/down). It's a few keys yes, but works.

It also has the multiple cursors too

August 17, 2016 22:40
CTRL + M followed by CTRL + O will quickly collapse your class methods to make it a bit easier to move around. I use this all the time.
August 17, 2016 22:41
Nice! I've never been a VS guy but the more I follow your posts and podcasts the more intrigued I become. I am a die hard IntelliJ user and most/all of these niceties are also this IDE. (I should do an equivalent post in IntellJ/Android Studio!) while I've long belt that IntelliJ was the BEST IDE of all time I have to say I have have been giving VS a second look. I work in VS Code these days. Do you have tips for Code as well?
August 18, 2016 0:06
shift-alt-select is great when you need it.
August 18, 2016 0:15
Ctrl+shift+alt+Up/Down: move function/property/member up/down
August 18, 2016 5:52
No one seems to be using CTRL+- or CTRL+SHIFT+-. This lets you navigate backward/forward to your last cursor position.
August 18, 2016 6:41
just learned ctrl+shift+a today for add new file to current folder
August 18, 2016 7:38
@Rosdi Ctrl+, followed by Ctrl+V totally works for me. Maybe Resharper broke it for you? :trollface:
August 18, 2016 8:29
I just learned yesterday
Ctrl + Enter -> 'O' in vim
Ctrl + Shift + Enter -> 'o' in vim
Ctrl + Shift + L -> 'dd' in vim
August 18, 2016 8:55
Thanks for finally talking about > Visual Studio's most useful (and underused) tips
- Scott Hanselman < Loved it!
August 18, 2016 9:04
Some work in vs code also
August 18, 2016 9:26
With pining, do yourself a favour and rebind pin to ctrl-p

Anyone who prints their source code out should be shot :) especially if you need print as a hotkey

August 18, 2016 9:37
@Alastair Chapman

In response to ALT-DRAG in vscode

VS Code has the more superior feature of multiple cursors which allow multiple line editing, but on every line you can put your cursor in a different spot if you want

or if you want a block quickly

CTRL-ALT-Down Arrow

then type!

Esc to get rid of them

Or with mouse SHIFT-ALT select an area, it's quite flexible
August 18, 2016 9:56
My fave and most used is:
ctrl + [ + s

It highlights and brings into view the currently active file in the Solution Explorer.
August 18, 2016 10:44
I don't think the pinned tab/preview tab tab management solution works very well; the not-so-great declare tab bankruptcy works better in an unfortunately large number of scenarios.

It takes time and thought to pick pinned tabs, and in particular in means you know fairly early on which tabs are likely to be relevant to your current edit. In that one scenario - pinned tabs work - great! use em!

But there are many edits I make where I a priori do not know exactly what I need to change where in the codebase; e.g. you might discover something to change and you follow the changes as dictated by "if I change this type here, what miscompiles?". And during such an editing sequence it emerges that one or two files are central to unravelling the spagetti; whereas others that seem relevant turn out not to be.

I'd much rather have the feature "auto-kill all (possibly unpinned) tabs without unsaved changes that are not on the top N (e.g. 50) most recently used". Or really, any semi-sane heuristic for separating "important" from "stale" tabs while keeping the number open limited. Closing the wrong tab isn't a huge problem as long as the last few you viewed aren't the ones killed.
August 18, 2016 12:31
Hat-tip here to Rockscroll, which started the whole map-mode thing anyway.
And I heard of that here, for - what was it - VS2010 or something?

(Nope, just checked, VS2005 and VS2008!)
August 18, 2016 15:25
I watch so many devs highlighting words or chunks of code slowly with their mouse it drives me nuts. Simple shortcuts that have been there forever, but seem to be rarely used:

Ctrl + LeftClick = highlights the whole word under the cursor(as does double-LeftClick)

Ctrl + ] = With caret before a bracket, it leaps to the matching bracket

Ctrl + Left/Right Cursor = Move caret to start or end of word

Hold down the shift key while doing this and you quickly highlight words and code chunks much faster and more accurately than messing around with your mouse.

I lament the sad death of Quick Macros in recent VS versions. Knowing all the keyboard shortcuts and being able to do quick record & playback loops was a huge timesaver. I had to go out and learn to use AutoHotKey to replace this & I still miss it..
August 18, 2016 16:34
CTRL+R,R turns on Rename mode, so you can rename an identifier and see all the changes in live preview.

Once I started using CTRL+Q, I have no more need of the toolbars or the menu bar (with the Hide Main Menu extension).
August 18, 2016 17:19
Alas, for those of us doing Compact Framework projects still stuck with VS2008, none of these goodies are available. Thank goodness that things are moving towards Xamarin and away from CF!
August 18, 2016 19:04
You can use Alt+mouse drag to select a range of columns and rows (similar to the old style of selection on a console host window). Once selected, you can delete or insert or replace any text in the selection area at the same time, allowing you to modify whole blocks of text together (to, say, insert spaces, or change a value across multiple rows).
August 18, 2016 19:06
My personal favorite tips:
Ctrl+i, then start typing (followed by F3, as necessary) = quickest way to search through the current document.

Ctrl+Shift+V = cycling through the clipboard "ring". I use this especially if I want to swap two items: copy itemA, copy itemB, Ctrl+Shift+V over itemA, then Ctrl+Shift+V+V over itemB = swapped.
August 18, 2016 20:55
Ctrl+K, C - Comment out selected
Ctrl+K, U - Uncomment out selected

Use this all the time, and is context aware - it'll use // in a .cs file, <!-- --> in XML, and config files.

Same commands in Sql Management Studio too.
August 18, 2016 21:57
I knew about the alt+up/down one. It is my favourite thing in Eclipse (along with ctrl+alt+up/down to duplicate selected lines), and I had been adding it to Visual Studio with plugins until they finally built it in. It's a real time saver ;)
August 18, 2016 22:06
In VSCode, Sublime, and Atom,

is Add Selection To Next Find Match

Its quite handy, I hope this can be added to VS.
August 19, 2016 7:20

You are right.... Ctrl+, brings up Recent Files (a R# feature) in my VS... lol... my mistake... thanks for pointing that out..
August 19, 2016 12:05
That's pretty cool to be honest! I was trying out the map mode feature and found out something amazing - say if you are working on a large file and having trouble scrolling up and down to see what other methods do or for some reason wish to be able to see a section of the code whilst you are working on some other section of the code in that class, you can now split the view into two halves.

To do this, in map mode view to the right, you'll find an arrow at the very top of the map mode, drag this arrow to the bottom and voila!, you can now see two separate sections of the same class!

Now this same feature is also available in the bar mode if you weren't already aware :)
August 19, 2016 12:35
I wasn't aware of Ctrl-; (despite it being clearly marked - but then others missed Quick Launch) and I'd forgotten Ctrl-I

How about a blog post on "most annoying feature for Visual Studio" which would probably answer most of the niggles: changing the default search options especially for Selection would be high on my list, and how to replace Ctrl-F2-Tab-Tab-Down with a single keystroke for what-is-that-called-anyway.
August 19, 2016 14:00
File browser in DPack is much more better than Ctrl+;

August 19, 2016 19:42
Is there a way to search a string inside a specific type of file? For example, if I'm searching a project using Ctr-F and I know the value is inside a XML file, it would be very useful to only search XML files, and not js, htm, txt, and every other file type inside the solution.
August 19, 2016 23:59
I loved the Alt+Arrow one, its really cool and useful and did not have any idea that it exist.
August 20, 2016 2:39
I love the Quick Search! Can you give any insight on how it is implemented? I'd love to include something similar in our applications.
August 20, 2016 15:08
Great tips... always good to re-remember stuff :) One of my favourites is ALT+F12, if you are on an object it will give you an inline view of the class or method you are calling. Great if you are trying to get grips on a solution you've been handed over.

August 20, 2016 16:24
Great post, I started using these tips, and coding goes easier.
There is a feature I hope if it was there: when I click a varible/field/ method, etc, all occurrences of it appear highlighted on the scroll bar, just like when I search them using Find/Replace window.
If I can do customized settings to enable it, please tell me how.
August 21, 2016 15:47
I like to re-map the Navigate To feature to CRTL + SHIFT + T, as we don't have resharper and that was one of the most used features for me.

Also Remove and Sort references is great, although I think you need to map that using the Keyboard options.
August 23, 2016 4:37
One of my favorites when coding:

Surround With
Ctrl+K, Ctrl+S
August 24, 2016 6:38
I like to break lines at a certain line length, and I often need to merge two lines into one.

Before I used to hit Ctrl + Shift + ArrowRight repeatedly to select the text to the next line including white-space, and hit Backspace.

Now I found that Ctrl + Delete or Ctrl + Backspace does that trick for me.
August 24, 2016 19:06
Wow, I can't believe you read my comment and gave us another great post ! This really make my day !
August 25, 2016 16:25
I don't think anyone yet has mentioned View/Navigate Backwards: Ctrl+'-'

That's one I use all the time. Typical use case:

- You're working on some code and want to look up a definition so you hit f12 and the buffer changes to that definition (which could be in the same file or another)
- Hit Ctrl+'-' to go back to where you were.

Also useful if you need to 'push to the stack' by navigating elsewhere (eg adding an include file) and then use this shortcut to pop the stack to get back to where you were.
September 01, 2016 0:12
Here's a set that I try to teach to our new hires:

Pinned files in their own row (settings)

Use the alt + enter menu when available (rename suggestions etc)

ctrl + f12 > go to implementation (so glad this got introduced in one of the updates)
ctrl + k + d > format document
ctrl + D > duplicate line
ctrl + tab/ctrl + shift + tab > switch recent files
ctrl + upArrow/downArrow > scroll page up/down without moving cursor
alt + shift + up/down block highlighting
ctrl + m + o > collapse all (ctrl + m + l > invert collapsed state)
ctrl + m + m > toggle collapsed state of function
ctrl + k + c > comment
ctrl + k + u > uncomment

turn on line numbers for all files
turn on white space characters

use the mouse less, it takes a little bit but you'll get faster.
September 02, 2016 11:30
very useful tips :)

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.