Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstColumn,True)
#Visual studio shortcuts to go the end of line code#
adjusted the code posted by Lolo) a RemoveLineOrBlock macro. Unless you are working on a very small screen, chances are you split your IDE into two or three views to switch more smoothly between files.
Go ahead, open Visual Studio Code and let’s get started. !a:: Alt+A = Comment this line, uncomment aboveĪs a freebie, I just invented (well. Here, I would like to present some of the shortcuts that I have found to best increase productivity. I sometimes use very impressive Multi Clipboard script to easy handle with many clips saved on disk and use with CTRL+ C, X, V to copy,paste,cut,next,previous,delete this,delete all. If you are more curious you would add shortcuts to thisable/enable script. I have link to this file "Shortcut to CommentDuplikateSaveClipboard.ahk" in Autostart in windows. You can edit/remove shortcuts it is easy. I use application link: AutoHotkey with below code saved in CommentDuplikateSaveClipboard.ahk file. Selection.MoveToDispla圜olumn(lineNumber, 0) Selection.MoveToDispla圜olumn(selection.BottomLine, 0) Selection.MoveToDispla圜olumn(bottom, 0, True) If you like eclipse style line (or block) duplicating using CTRL+ ALT+ UP or CTRL+ UP+ DOWN, below I post macros for this purpose: Imports Systemĭim selection As TextSelection = ĭim bottom As Integer = selection.BottomLine you should now see the shortcut in the "Shortcuts for selected command" textbox.
set focus in the "Press shortcut keys" textbox and hit the combination on the keyboard you whish to use for it ( Ctrl+ Shift+ D in.But you can also select a group of lines only partially with this shortcut. choose "Text Editor" from the "Use new shortcut in" list Dragging your cursor across lines of code or text selects each line from end to end.you should now see the macro in the list below.in the "Show Commands Containing" textbox, enter "duplicate" (this according to the name you gave the module.).Now just assign a keyboard shortcut to it: ("Tools->Macros->Macro Explorer" or Alt+ F8) and copy paste the code inĪ new module. To create the macro, just go to the macro explorer If you'd like to implement a more complete solution, perhaps to create a simpler keyboard shortcut or you don't want to effect the clipboard, see this guide:ĭTE.(0)ĭTE.(True) Pre VS2017, built-in method using clipboardĪs mentioned, you can just do Ctrl + C Ctrl + V.Ĭtrl + C will copy the line if nothing is selected. You can assign it to a different key combination, or find it in the menu: (edit) This feature is now built-in in VS2017: Ctrl + E, V duplicates a line if nothing is selected, or duplicates selection. Ctrl + D In Visual Studio 2017 (v15.6 and after)Ĭtrl + D In Visual Studio 2017 (pre v15.6)