Skipping boost and stl libraries while debugging

This trick will allow you to step over boost and stl functions when debugging. It will not allow you to step into any of that stuff. Yippee.
The downside is that if you want to follow where a boost::signal ends up, you won’t be able to unless you already know where it’s going.

  1. Create a file called: boost_stl.natstepfilter
  2. Dump contents below into it.
  3. Put that file into your “C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Packages\Debugger\Visualizers” directory.

Visual Studio find window formatting

1. Go to HKCU\Software\Microsoft\VisualStudio\8.0\Find
2. Add a new string value called “Find result format” with a value of $f$e($l,$c):$t\r\n where

$f is the filename
$e is the extension
$l is the line
$c is the column
$t is the text on the line

Note:  You don’t have to restart Visual Studio to pick up on your registry changes.

Files
$p      path
$f      filename
$v      drive/unc share
$d      dir
$n      name
$e      .ext

Location
$l      line
$c      col
$x      end col if on first line, else end of first line
$L      span end line
$C      span end col

Text
$0      matched text
$t      text of first line
$s      summary of hit
$T      text of spanned lines

Char
\n      newline
\s      space
\t      tab
\\      slash
\$      $

The one I personally use is this: “$f$e($l,$c)\s-$s\n”

VsVim for Visual Studio 2012

Since I started using visual studio 2012 in April, I have discovered that the vsVim plugin extension is very very good. I highly recommend it if you want to swing that way. It’s not perfect, but it’s much more functional than it used to be and it’s frequently updated, which is great. I use it at work and I find that using vsVim, and visual studio hotkeys allows me to work without ever having to touch the mouse. These are the commonly used hotkeys that I use to navigate around:

Ctrl+S (I installed the “switch” extension) – navigates between .h and .cpp files
Ctrl+Tab – Navigates between sources files. Just pressing once goes to the last file used. Pressing multiple times allows you to navigate.
Ctrl+; – Searches for the name of a file in the project.
Ctrl+Alt+F – standard file search.
F5, Ctrl+F5, F7, Ctrl+F7 – Build commands.
F12, Ctrl+F12 (go to definition/declaration)

VS2010 Extension – Better Fix Mixed Tabs

I frequently deal with code that has tabs in it that needs to be converted over to code without tabs, preferably without losing any formatting. Unfortunately I have yet to find an extension to do this. I thought an extension called “Fix Mixed Tabs” would do the trick, but it only untabifies or tabifies the beginning of a line, so I wrote this one which can be found in Microsoft’s Visual Studio 2010’s gallery.

It can convert between tabs and spaces, it doesn’t go just one way.

Title: Better Fix Mixed Tabs (because Fix Mixed Tabs doesn’t do what I needed)
Link on Microsoft’s site (recommended): Better Fix Mixed Tabs

Linking libraries in code with MSVS

If you use visual studio, you can use a #pragma to tell the linker to link in a library. This way, you don’t have to screw with project settings if you just want to quickly test something.  For example, if you wanted to link in the winmm.lib import library, it is done like so:

vim – Vim Emulators

NetBeans: jvi
For VS2010, free but sucked last time I checked: VsVIM
For VS 2010/2008/2005: ViEmu

UPDATE: VsVim is now the best one. It no longer sucks. 😀