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.

Macros.Samples.Accessibility.DecreaseTextEditorFontSize
Decreases the text editor font size in Visual Studio

Macros.Samples.Accessibility.IncreaseTextEditorFontSize
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, 26 January 2009 11:38:48 (Eastern Standard Time, UTC-05:00)  #    Comments [5] - Trackback

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


http://geekswithblogs.net/SoftwareDoneRight/archive/2007/12/12/coolcommands-in-visual-studio-2008.aspx
Monday, 26 January 2009 15:43:11 (Eastern Standard Time, UTC-05:00)
Using VS2008, I do not have these macros :(
Tuesday, 27 January 2009 05:21:59 (Eastern Standard Time, UTC-05:00)
Brian Genisio,
I've shared the file here:

http://www.quickshare.co.za/files/75jea7wd/Accessibility.vb.html

Wednesday, 18 March 2009 11:10:44 (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, 12 September 2011 08:47:06 (Eastern Daylight Time, UTC-04:00)
Thanks for that! Very useful!
Vicky
OpenID
Please login with either your OpenID above, or your details below.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (HTML not allowed)  

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

Live Comment Preview