For Developers‎ > ‎How-Tos‎ > ‎

VisualStudio Tricks

Here is an incomplete stack of tricks to help you work with Chromium in Visual Studio.

Column Limit

You can setup a guide at 80 column for the source file view.
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor]
"Guides"="RGB(128,0,0) 80"

You can also try "RGB(192,192,192) 80".

Note: In VisualStudio 2010 this feature can be added by installing an extension for VisualStudio.

cpplint.py integration

cpplint.py integration makes it easy to check that a source file conforms to the style guide. To do this, just go to Tools > External Tools > Add. Specify:
  • Title: cpplint.py
  • Command: C:\depot_tools\python_bin\python.exe
  • Arguments: C:\depot_tools\cpplint.py --output=vs7 $(ItemPath)
  • Initial directory: $(ItemDir)
  • Check Use Output window
To create a keyboard shortcut:
  1. Go to Tools > Options > Environment > Keyboard.
  2. Select Tools.ExternalCommand1. (This assumes cpplint.py is your first external command in your Tools menu.)
  3. Press a shortcut key (let's say Alt+L) and Assign it.
  4. Press OK.

Text Editor (No tabs, indentation, line numbers)

The style guide requires no tabs and 2 char indentation. To set this, go to Tools > Options. On the Text Editor/All languages/Tabs page, set
  • Indenting radio to Smart
  • Tab size and Indent Size to 2
  • Check Insert spaces
On the Text Editor/All languages/General page, set
  • Check Line numbers

Debugging visualization, macros, more

See also:
Comments