Jay Harris is Cpt. LoadTest

a .net developers blog on improving user experience of humans and coders
Home | About | Speaking | Contact | Archives | RSS
Filed under: Speaking | Tools | Visual Studio

Increasing or decreasing the font size of your code in Visual Studio's text editor is almost required whenever VS is fired up on a projector. Anyone who has had to demo code, or give a talk at a user group, or present new technologies to their team has experienced the pain of increasing the font size through the Tools -> Options menu, followed by an inquiry to the crowd: "How's that? Is this font size readable by everyone?" Often times the selected size is not quite the right solution, and the process is repeated. Life as a presenter would be easier if only you could modify the font size through a simple keyboard command, similar to how browsers enable you adjust the font through the ctrl+ and ctrl- commands.

Decreases the text editor font size in Visual Studio

Increases the text editor font size in Visual Studio

Fortunately, this is easy with the help of Visual Studio's Sample Macros. To help show you the ropes of writing custom macros, VS ships with a collection samples, and two of these samples respectively increase and decrease the font size of the text editor. Right out of the box, Visual Studio comes with the ability to modify the font size for your code; all that remains is mapping these macros to the keyboard.

Visual Studio Options Window, Assigning Macro to Keyboard CommandMapping to the Keyboard

Anchoring these macros to specific keyboard commands is a simple process.

  1. From Visual Studio, access the Tools -> Options menu.
  2. In the Options window, navigate to Environment -> Keyboard.
  3. Using the "Show commands containing" input, enter in IncreaseText or DecreaseText. The list of available commands will automatically filter as you type, reducing the list to the applicable macro.
  4. Select the macro command, and select the "Press shortcut keys" input, and enter your desired keyboard command. Click the Assign button to set the command. I use "Ctrl, Alt, Shift, =" (plus) and "Ctrl, Alt, Shift, -" for my Increase and Decrease commands, respectively.
Monday, January 26, 2009 11:38:48 AM (Eastern Standard Time, UTC-05:00)  #    Comments [5] - Trackback

Monday, January 26, 2009 1:01:41 PM (Eastern Standard Time, UTC-05:00)
Check out Gaston Milano's CoolCommands for some great functionality around this, plus more.

Monday, January 26, 2009 3:43:11 PM (Eastern Standard Time, UTC-05:00)
Using VS2008, I do not have these macros :(
Tuesday, January 27, 2009 5:21:59 AM (Eastern Standard Time, UTC-05:00)
Brian Genisio,
I've shared the file here:


Wednesday, March 18, 2009 11:10:44 AM (Eastern Standard Time, UTC-05:00)

Thank you for another great article. Where else could anyone get that kind of information in such a perfect way of presentation.
Monday, September 12, 2011 8:47:06 AM (Eastern Daylight Time, UTC-04:00)
Thanks for that! Very useful!
Please login with either your OpenID above, or your details below.
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

[Captcha]Enter the code shown (prevents robots):

Live Comment Preview