62

Is there a way to set the default zoom level in Visual Studio 2010? The problem is that I find font size 10 to be too small, but font size 11 is too big. It just so happens that 90% zoom level with font size 11 gives the perfect size I am looking for. I would like to be able to have VS automatically always zoom the editor to 90%.

Ciro Santilli OurBigBook.com
  • 347,512
  • 102
  • 1,199
  • 985
Wayne Koorts
  • 10,861
  • 13
  • 46
  • 72
  • 2
    Perhaps using a different font might give you an acceptable result. Various fonts show differently at the same font size, and you might find something you like better than whatever you're using now. Personally, I love **Dina**. http://www.donationcoder.com/Software/Jibz/Dina/ but there are tons to choose from, start here: http://www.codinghorror.com/blog/2007/10/revisiting-programming-fonts.html – Samuel Neff Jan 23 '11 at 02:09
  • Thanks, I've been through many dozens of fonts over the years and Consolas is it for me at this stage. I'd rather have a font size I'm not entirely content with than a font I don't love. – Wayne Koorts Jan 23 '11 at 02:23
  • 1
    @Samuel: I'm with you 100% on Dina being the best programming font. I simply can't use anything else. Unfortunately, the version on the website you link to doesn't work with VS 2010. There are versions that have been converted to work properly, you can download one [here](http://chrisrickard.blogspot.com/2010/03/dina-font-for-visual-studio-2010.html) or [here](http://www.geenat.com/?p=66). – Cody Gray - on strike Jan 23 '11 at 05:03
  • @Cody Gray, thanks for the links. I'm still using VS2008 but am moving to VS2010 in a few weeks. – Samuel Neff Jan 23 '11 at 15:58
  • I bet $100 you are using the very great Consolas font on a display with an average pixel density :) – Kaerber Dec 10 '14 at 07:48

10 Answers10

33

The VSCommands Lite extension appears to do this, judging by this blog post.

I don't think there's any way to do this other than using/writing an extension; macros don't appear to have access to the zoom controls.

If you wanted to write your own custom extension to do this you'd probably be looking at using the IWpfTextView interface.

Another good option is Presentation Zoom.

slugster
  • 49,403
  • 14
  • 95
  • 145
richardwb
  • 4,339
  • 33
  • 19
  • Thanks for the VSCommands link, I've just downloaded and played with this extension and it helps. Unfortunately it doesn't apply the "default zoom" setting to opened projects, just new files as they are created. The zoom synchronising feature definitely helps though. As for writing an extension, I might well do that - it would be a fun exercise if nothing else. If I do, I will open source it and link it back here. – Wayne Koorts Jan 23 '11 at 07:20
  • 4
    I have found Presentation Zoom to be just fine. It doesn't set the zoom to a default, it sets it to whatever you choose with usual GUI, so when you open you sln for the first time you need to ctrl+scroll to set the zoom, but from then on all new editors open with that zoom, and it's synch'd up so if you change it in one it changes in all - just what I needed. Perfect - thanks for link @richardwb – MemeDeveloper Mar 25 '12 at 01:05
  • 1
    This is also true for VS2012! "Presentation Zoom" doesn't exist in search results for VS2012 yet... – Watki02 Oct 19 '12 at 20:54
  • 3
    For VS2012, the TroutZoom extension does the same thing: http://visualstudiogallery.msdn.microsoft.com/71870f0e-87bb-4a5f-8abd-e8e5e0ccb900?SRC=VSIDE – Jacob Foshee Feb 04 '13 at 11:36
20

You can also use the keyboard. The default bindings are:

  • ctrl + shift + . (zoom in)
  • ctrl + shift + , (zoom out)
Philipp M
  • 1,877
  • 7
  • 27
  • 38
penderi
  • 8,673
  • 5
  • 45
  • 62
14

As stated by richardwb VSCommands 10 has this option, it's free and will control default zoom level on all open documents.

ZoomExample

Clarification: It seems that VS Commmands doesn't set the default zoom % when Visual Studio is first opened. But it does a good job of keeping everything at the default zoom % after I set it manually a single time on one document. Since I keep VS itself open for long periods this gets me most of what I need.

Chris
  • 1,038
  • 18
  • 23
  • I just haven't been able to get this working. I've enabled the zoom option but my documents stay at 100%. I have closed and re-opened VS, the solution, individual files, re-saved the setting even, no joy. – Wayne Koorts May 24 '12 at 21:51
  • VS Commands syncs the zoom on all open documents for me when I set the zoom by hand on a single open document, it also opens new documents at the default zoom level set in the options. I was hoping VS Commands would set the default zoom when VS is first opened but this doesn't appear to be the case. – Chris May 25 '12 at 13:44
  • I have install this now where can i found to zoom option that you have mention above can you please help me!!!! – cracker Jun 10 '14 at 06:54
  • @cracker - Follow these menu options, Tools -> VSCommands -> Options. Zooming will be one of the options displayed. – Chris Jun 11 '14 at 19:27
  • works well in vs 2012 - will need to restart / reopen for the default zoom to take effect – user314321 Nov 25 '15 at 18:15
14

As far as I am aware you cannot set a default value for the zoom level. Instead, consider setting the default font size for the text editor.

Tim Lloyd
  • 37,954
  • 10
  • 100
  • 130
  • As I said, there is no suitable font size available. – Wayne Koorts Jan 23 '11 at 01:40
  • I've just had a play in VS2010 - I see what you mean. Unfortunately you are out-of-luck as you cannot define a fractional font size for the text editor. You can have 10 or 11 - bummer. Although 90% of 11pt would actually be 9.9pt, but that is obviously not the effect you actually get. Go figure. – Tim Lloyd Jan 23 '11 at 01:47
  • Yeah, a bit of dilemma, I did try a fractional font size :) Not the end of the world but it would make my coding time more pleasant for sure. – Wayne Koorts Jan 23 '11 at 01:49
4

I recommand this extension : http://visualstudiogallery.msdn.microsoft.com/6a7a0b57-7059-470d-bcfa-60ceb78dc752?SRC=VSIDE

"This extension creates a global zoom level so that if you zoom a single window, all editor instances will be updated to that zoom level."

neilbgr
  • 81
  • 1
4

I realize this is a bit old...

But incase anyone comes across this like I have - I use Visual Studio 2012, and just tried this extension: https://visualstudiogallery.msdn.microsoft.com/6e3d9e23-8083-4ce3-8ca2-af846c93ad2b

It sets the default zoom to 91%, which is perfect! Every file I open automatically is at 91%. So, thought I would throw that out there for anyone who needs it. I had to go through some that didn't work unfortunately.

3

This extension works great for me:

http://visualstudiogallery.msdn.microsoft.com/6a7a0b57-7059-470d-bcfa-60ceb78dc752

Presentation Zoom

This extension creates a global zoom level so that if you zoom a single window, all editor instances will be updated to that zoom level.

Brown
  • 1,132
  • 1
  • 13
  • 33
  • 1
    Presentation zoom requires you to zoom a window everytime you open VS. The OP was asking for the zoom level to remain fixed once he chooses it. A very useful extension nevertheless. – Nav Mar 28 '13 at 05:34
3

TroutZoom is my favourite solution and works great with VS2013 !

A simple extension that syncs zoom levels across windows, and sessions VS 2012 and 2013. You can zoom in and out with scroll wheel

N.B. I have also tried the extensions

  • PresentationZoom
  • Global Zoom Level
  • AutoZoomer

and simply

  • font size settings in VS options
  • windows scaling
  • screen resolutions
MemeDeveloper
  • 6,457
  • 2
  • 42
  • 58
2

Global Zoom Level Extension is very good as well

This extension causes the selected zoom level in the editor window to be applied globally across all (zoomable) editor windows. The zoom level is saved and reapplied across sessions, so it does not have to be manually reset every time Visual Studio is launched.

Wahid Bitar
  • 13,776
  • 13
  • 78
  • 106
1

I think that Ctrl+Scroll changes the zoom in Visual Studio. Every time you open it, you could just press a key and flick the mouse wheel. I bet you could also write an extension that does this... Though I've never written a Visual Studio extension, so I don't really know what the APIs offer.

Aurum Aquila
  • 9,126
  • 4
  • 25
  • 24
  • 1
    It changes the zoom of a single window, and when you close that window and open it again, boom, you are back to default 100% zoom. – Kaerber Dec 10 '14 at 07:47