lukesdm / little-braces

A Visual Studio editor extension that shrinks lines of C, C++ and C# code that contain only curly braces

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Little Braces

A Visual Studio editor extension that shrinks lines of C, C++ and C# code that contain only curly braces.

UPDATE: An update to the Productivity Power Tools extension added a similar feature for VS 2013. They've called it 'Syntactic Line Compression'.

###Requirements Visual Studio 2010. 2012 should also work, but is untested.

Download/Installation

Download, then double-click/activate the VSIX file in Explorer.

Usage

Once installed, the effect is enabled immediately. Note: lines containing only }; are also shrunk, e.g. object initializers.

By default, the lines are shrunk to 0.3x the standard size. If this isn't satisfactory, you can edit the 'BraceLineScale.txt' file in the extension's install directory - it contains just the scale factor as a decimal. Changes will be applied the next time Visual Studio is started.

Caveats

  • If line numbers are visible, they look a bit messy for the shrunken lines.
  • The same goes for breakpoints on those lines
  • As the lines are shrunken, selecting them is tricker.

Uninstallation

In VS, open the Extension Manager, select Little Braces, then click uninstall. A restart of VS is required.

Development Info

This is a very simple extension. There's just a single 69-line source file. It uses a LineTransformSource.

License

Eclipse Public License v1.0. See license text for details.

About

A Visual Studio editor extension that shrinks lines of C, C++ and C# code that contain only curly braces

License:Eclipse Public License 1.0


Languages

Language:C# 100.0%