VisualStudio Tricks

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".

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:
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值