Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Visual Studio: Zoom in the Editor

📅 2011-Jun-03 ⬩ ✍️ Ashwin Nanjappa ⬩ 📚 Archive


One of the neat features in Visual Studio 2010 is that zooming into and out of text is baked into the editor. Using the mouse, zoom can be applied by rolling the mouse scrollwheel while keeping the Ctrl key pressed. Using the keyboard, the same can be achieved by pressing Ctrl+> or Ctrl+< to zoom in and out.

If you are stuck with Visual Studio 2008, do not worry, it has this feature hidden away in a dark corner! Open Tools → Options and drill down to Environment → Keyboard. The commands you are looking for are Macros.Samples.Accessibility.DecreaseTextEditorFontSize and Macros.Samples.Accessibility.IncreaseTextEditorFontSize. Set keyboard shortcuts for these two commands and you are done! I like to set them to the same as in Visual Studio 2010: Ctrl+< and Ctrl+>.

In Visual Studio 2010, the zoom increment can be as small as 1%. I am guessing this is because it renders the editor using WPF. In Visual Studio 2008, the zoom increment is 10%, which I think is perfect and good enough! 😊