Copy Nice Extension

Today I learned about a handy little Visual Studio extension called Copy Nice whose sole purpose is to address an annoyance I encounter frequently where the indentation is off when I copy and paste code snippets. With this extension, when code is copied it will automatically be formatted to take care of the leading indentation issue. Now if only there was some system-level utility to this do when copying from anywhere…

January 10, 2024 · 1 min · Brandon Pugh

Copy git link extension

Today I learned about the Copy Git Link extension for Visual Studio which will give you the url of currently selected lines on your git hosting provider i.e azure devops or GitHub. Especially handy for quickly pointing a teammate to a particular part of the codebase.

October 11, 2023 · 1 min · Brandon Pugh

You can save window layouts in Visual Studio

If you go to Window > Save Window Layout, it’ll save your current window layout in Visual Studio. For example, when I have to go from my monitor setup to just my laptop, I tend to set the solution explorer to auto-hide and make the Test Explorer smaller. Now I can do it with just a keyboard shortcut!

July 31, 2023 · 1 min · Brandon Pugh

Visual Studio 2022 can stage individual lines in git

Visual Studio added support for staging to commit individual chunks of changes (also known as interactive staging). This essentially lets you commit only parts of the changes you’ve made to a file or easily undo those changes. This is probably my most-used feature in a git gui client. One caveat, it took me a minute to figure out how to use it in VS because if you have an external diff tool configured in git then clicking to view the diff in VS will open that tool instead of the VS diff viewer....

July 12, 2023 · 1 min · Brandon Pugh

Create new files faster

You can use ctrl+shift+a to open the new quick add dialog in VS 2022: https://devblogs.microsoft.com/visualstudio/adding-new-files-just-got-a-lot-faster/

July 7, 2023 · 1 min · Brandon Pugh