Sunday, September 9, 2007

Zoom in / Zoom out code in Visual Studio

When I browse code looking for something or when I take a look at a new class I want to see as much code as I can. But then when I enter the “coding” mode I want to focus on code that I write and I want to have bigger font to make it easier to read.

To achieve this you could change the font size in options, well this is what you have to do. But doing it manually is not real.

The simplest solution is to just make font bigger/smaller using a shortcut key. We could write macro for that… wait, hold on… what I see, Visual Studio already has macro for making source code editor font bigger/smaller, sweet– high five!

macros

So the only thing we have to do is just bind shortcut keys to those macros.

I use CTRL+A for making the font bigger and CTRL+Z for making it smaller (just like changing gears in Need For Speed, well just without CTRL key).

So in results we have something like this:

test

The first time the macro is executed it runs slowly, but next calls are fast.


1 comment:

Unknown said...

VS2008 Workaround Quick Instructions:
Right-click toolbar area -> Customize -> Commands -> Macros:
Samples.Accessibility.IncreaseTextEditorFontSize
Samples.Accessibility.DecreaseTextEditorFontSize
Optionally, customize the labels & icons (+/-)

Full Instructions @ http://david.safitech.com/?p=169

Critical for couch potato coders (52" LCD + Win7 + Wireless Entertainment Desktop 8000 = Major Win)