VSTricks is a Visual Studio extension that adds a few simple productivity enhancements to the development environment:
Version 1.12: Added settings page for setting common keyboard shortcuts. Added intro window on first launch to set keyboard shortcuts. Added setting for extend/delete next sub-word commands to stop at the end of the current word instead of continuing to the beginning of the next word.
Version 1.11: Final support for Visual Studio 2019, with auto-asynchronous loading. Also removed embedded binaries. Note that VS2012 is no longer supported.
Version 1.10: Initial support for Visual Studio 2019 (support for auto-asynchronous loading will come soon).
Version 1.9: Added CopyAppend, CutAppend, PasteAppendToLines, and DeleteTrailingWhitespace commands. Moved menu items to appropriate places in Edit.
Version 1.8: Added support for Visual Studio 2017; added new options to the Surround Selected Lines dialog and fixed bugs in that feature.
Version 1.7: Added settings page for sub-word navigation. Added settings for using capital letters, numerals, and/or underscores as sub-word boundaries.
Version 1.6: Added support for Visual Studio 2015; added Edit.SubWordDeleteToEnd, Edit.SubWordDeleteToStart, Edit.SubWordNextExtendColumn, and Edit.SubWordPreviousExtendColumn commands; fixed a bug with duplicating multi-line selections.
Version 1.5: Added support for Visual Studio 2013; fixed a bug with sub-word navigation over underscores.
Version 1.4: Fixed a bug with sub-word navigation in virtual space.
Version 1.3: First version released publicly.
If you have questions or problems with this extension, please ask a question here on the marketplace or email me at: vstricks -at- outlook.com.
The following describes each trick in more detail.
This trick adds the Edit.SubWordNext, Edit.SubWordPrevious, Edit.SubWordNextExtend, Edit.SubWordNextExtendColumn, Edit.SubWordPreviousExtend, Edit.SubWordPreviousExtendColumn, Edit.SubWordDeleteToEnd, and Edit.SubWordDeleteToStart commands. When executed, these commands move the cursor forward or backward by sub-words instead of whole words. Sub-words are defined by camelCase, PascalCase, or words_with_underscores. (There are no menu items for these commands.)
Note that the installer for this extension does NOT modify your keyboard bindings (e.g. Ctrl+Left, Ctrl+Right) to use sub-word navigation. You will need to go into Tools > Options > Environment > Keyboard and bind keystrokes of your choosing to the desired commands listed above.
Surround Selected Lines
This trick adds the Edit.SurroundSelectedLines command (Edit > Advanced > Surround Selected Lines). When executed, it will prompt for text to prepend and append to each line that is currently selected. In addition, you can specify a counter value that's incremented for each line to add to the text as well. This works for box selections, too!
Duplicate Line or Selection
This trick adds the Edit.DuplicateLineSelection command (Edit > Advanced > Duplicate Line/Selection). When executed, it will duplicated the selected text (if any) just after the selection, or if there is no selection it will duplicate the current line.
Copy as Plain Text
This trick adds the Edit.CopyasPlainText command (Edit > Copy as Plain Text). When executed, it will copy the current selected text (if any) or the current line (if no text is selected) to the clipboard as plain text, instead of rich text (which is the default for Visual Studio).
Copy and Cut Append
This trick adds the Edit.CopyAppend and Edit.CutAppend commands (Edit > Cut Append & Edit > Copy Append). When executed, they will copy (or cut) the selected text (if any) or the current line (if no text is selected) and append the copied/cut text to the existing clipboard text (instead of replacing it).
Paste Append to Existing Lines
This trick adds the Edit.PasteAppendToLines command (Edit > Paste - Append to Lines). When executed, this will paste text from the clipboard to the end of the current line. If the text in the clipboard contains multiple lines, the subsequent lines will be appended to the end of each of the following lines in the editor. If text is selected when this command is executed, only the selected lines will be appended to. If fewer lines are selected than are in the clipboard, only the number of selected lines from the clipboard will be used. If more lines are selected than are in the clipboard, the lines from the clipboard will be repeated so that all selected lines are appended to. For box selections, the text is pasted at the right-hand edge of the selection.
Delete Trailing Whitespace
This trick adds the Edit.DeleteTrailingWhitespace command (Edit > Advanced > Delete Trailing Whitespace). When executed, it will delete any trailing whitespace (whitespace before the end of a line) from the current selection. If there is no current selection, it will delete trailing whitespace in the entire file.