a lot - it's got some warts, and gaps, but there's some thing's it does amazingly well (and some it sort of stumbles at). If you write in Powershell, it's probably the best/lightest/most-stable editor I've found, with the range of features you get, and rampant-growth and availability in user-created extensions -
.
Anyway, one of my pet peeves for 'Code.exe' is it's lack of good quick popup references for common tasks - well that and some of it's interface & control choices that don't match most of the common keystrokes and mouse behaviors I've gotten used to in other editors.
. If you use AHK & 'Code', you might find this gapfills a niche.
I don't doubt you can hack Code.exe itself to display a menu with a hot key binding. But I work for a living ; I don't want to burn a lot of time learning how to build objects in code.exe itself. :P But I do make tons of use of AutoHotKey these days --
-- so I decided yesterday to take a few minutes and whip up a quick popup dialog in AHK that just lists out the key keyboard shortcuts I want to use (especially where addon extension commands and bindings are concerned).
It's pretty simple, docs are inline in the script (stored & kept updated at Github):
Two chunks below: the .ahk script file, and a .csv file that drives the displayed menu.
Lemme know if you have any questions. :^D
Static-source follows (for folks in RSS readers, or disabling scripting): (check the linked Gist/Github links below for _current_ versions) .
vsc-cheatsheet.ahk:
;;; vsc-cheatsheet.ahk /* #*------v NOTES v------ .SYNOPSIS vsc-cheatsheet.ahk - Quick`nDirty Autohotkey-based popup reference menu for Visual Studio Code keyboard shortcuts .NOTES Written By: Todd Kadrie Website: http://tinstoys.blogspot.com Twitter: http://twitter.com/tostka Change Log ;;; 8:28 AM 10/25/2016 .DESCRIPTION vsc-cheatsheet.ahk - Quick`nDirty Autohotkey-based popup reference menu for Visual Studio Code keyboard shortcuts configurating AHK is beyond the scope of this script. See https://autohotkey.com/docs/Tutorial.htm for more information This script leverages an Excel (or other spreadsheet app) exported 'Formatted Text (Space delimited) .PRN file. I know you can build fancier dialogs with AHK, but for my purposes, a space-delimted PRN using the Lucida Console font, gives me a simple way to alighn columns, without wrestling with fancier nested tables & other controls from AHK. To use the script: 1) Add the functions below to your normal .ahk script. And update the sAHKSdir entry to point to the directory where you store your AHK scripts. 2) Copy the .csv file to your AHK script dir 3) Open the included csv file in Excel (or your spreadsheet of choice): a. Select all of the columns and dbl-click on vertical line on the header row, between Col A and Col B. This has the effect of auto-sizing all of the selected columns, fully & neatly displaying the cell contents b. Play with he column widths to approximate the layout you want. At the current time, the csv Contains the VSC/Code keyboard shortcuts I want to see. Pretty straight forward stuff c. Save-As the spreadsheet, and select 'Formatted Text (Space delimited) (*.prn), give it the name 'vsc-cheatsheet.prn' d. Then Save-As the spreadsheet again in .xlsx format (or your spreadsheets native format), for future editing & changes to your 'menu' 4) Restart your primary autohotkey script. 5) As written below, the popup dialog is bound to the Capslock & F1 key (CAPS+F1). The dialog can be dismissed by clicking on the Close window. *----------^ #*/ ;;; ====== ;;;#*======^ VSC-RELATED ^====== sAHKSdir :="C:\sc\ahk\ahkscripts\" ;;;*------v hs-vsc-cheatsheet (QuickRef) v------ :!:7VSCm:: capslock & F1:: tBPFname :=sAHKSdir . "vsc-cheatsheet.prn" IfNotExist, %tBPFname% { MsgBox, Error! missing %tBPFname%!.`n aborting. } else { FileRead, MyText, %tBPFname% ;;; create GUI object with Font assigned Gui Font,, Lucida Console ;;Gui Add, Text, HwndhwndStatic, % myText Gui Add, Text,, % myText ;;; 8:31 AM 12/1/2014 plice in a close btn Gui, Add, Button, Default, Close CoordMode, Mouse, Relative Gui, Show ;;hwnd:=WinExist("ahk_class ^AutoHotkeyGUI$") ;;; 7:46 AM 7/3/2014 click-close is broken, don't use regex even with regex matching... hwnd := WinExist("ahk_class AutoHotkeyGUI") ;;; 7:46 AM 7/3/2014 click-close is broken, switch out of regex, works } return ;;;*------^ END hs-vsc-cheatsheet (QuickRef) ^------ ;;;#*======^ END VSC-RELATED ^====== ;;; ======vsc-cheatsheet.csv:
===VSC:HOTKEYS===,,,,,,,,,, Key,Purpose,,Key,Purpose,,macro,Purpose,,macro,Purpose -----,---------------,,-----,---------------,,-----,---------------,,-----,--------------- '==Editing:,,,'==Navigation:,,,vsco7,Vscode open & recyclewin,,, Bracket/Brace Matching,Ctrl+Shift+\,,Goto Line,Ctrl+G,,,,,, Comment: (4key combos),,,Move Line Up/Down,Alt+Up,,,,,, Uncomment:,"Ctrl+k, Ctrl+c",,Al+Down,,,,,,, "Ctrl+k, Ctrl+u",,,Page Dn Scroll,Alt+PgDn,,,,,, Define Key binding,"Ctrl+k, Ctrl+k",,Page Up Scroll,Alt+PgUp,,,,,, "Find, Select Next Find Match","Ctrl+k, Ctrl+d",,Find,Ctrl+F,,,,,, Search for file/Pallette,Ctrl+P [type name],,Replace,Ctrl+H,,,,,, Trim Trailing Whitespace,"Ctrl+k, Ctrl+x",,Find Next,F3,,,,,, Ctrl+Shift+X,,,Find Prev,Shift+F3,,,,,, '==Code-related:,,,Select all occur of Find Match,Alt+Enter,,,,,, Code Formatting (adjust indents etc auto),Shift+Alt+F,,"Find, rgx Toggle",Alt+R,,,,,, Code Folding,Ctrl+Shift+[,,'==View Layout:,,,,,,, Ctrol+Shift+],,,Preview toggle (Markdown et al),Ctrl+Shift+V,,,,,, "Comment, Add Ln","Ctrl+K,Ctrl+C",,Preview side-by-side,Ctrl+K V,,,,,, "Comment, Remove Ln","Ctrl+K, Ctrl+U",,Problem pane (warnings/errors),Ctrl+Shift+m,,,,,, "Comment, Toggle Ln",Ctrl+/,,Side by Side Edit,Ctrl + \,,,,,, "Comment, Toggle Block",Shift+Alt+A,,Explorer window,Ctrl+E,,,,,, '==Ext:change-case: ,,,Zoom In/Out,Ctrl+= / Ctrl+-,,,,,, Case - Lcase,Ctrl+T l,,Access Terminal Console,Ctrl+` (like quake),,,,,, Case - Ucase,Ctrl+T u,,User Settings,"Ctrl+P, sett ",,,,,, Case - Ucase 1st,Ctrl+T u1,,New Edit Win (3 max),Ctrl + \,,,,,, Case - Lcase 1st,Ctrl+T l1,,Switch wins,Ctrl+[1-3],,,,,, Case - Camelcase,Ctrl+t c,,Hide Sidebar,Ctrl+B,,,,,, Case - TitleCase,Ctrl+T t,,History: Navigate,Ctrl+Tab,,,,,, Find all references,Shift+F12,,History: Back,Alt+Left,,,,,, Intellisense Suggest,Ctrl+Space,,History: Fwd,Alt+Right,,,,,, Snippets,Ctrl+Space,,'==Copy/Paste:,,,,,,, "Symbol, Goto Def","Select it, F12",,Rect Select/Column Select,Alt+Shift+Up,,,,,, "Symbol, Peek (vari, func etc)","Select it, Alt+F12 (or context mnu)",,Alt+Shift+Down,,,,,,, "Symbol, Rename (variable, func etc)","Select it, F2",,Copy Line (dupes below or above),Shift+Alt+Down,,,,,, '==Debugging:,,,Shift+Alt+Up,,,,,,, Powershell: Open in ISE,Ctrl+Shift+i,,Copy w Contextual Duplicate,"Ctrl+k, d",,,,,, Debug View,Ctrl+Shift+D,,Shrink / expand selection,Shift+Alt+Left ,,,,,, Run,F5,,Shift+Alt+Right,,,,,,, Stop,Shift-F5,,Select current line,Ctrl+I,,,,,, Step (Debug),F10,,Cut Line (no selection),Ctrl+X,,,,,, Step Into (Debug),F11,,Delete Line,Ctrl+Shift+K,,,,,, Step Out (Debug),Shift-F11,,Insert Line Below,Ctrl+Enter,,,,,, ,,,Insert Line Above,Ctrl+Shift+Enter,,,,,, ,,,Move Line Down,Alt+Down,,,,,, ,,,Move Line Up,Alt+Up,,,,,, ,,,Insert cursor @ EOL each line selected,Shift+Alt+I,,,,,, ,,,Select all occur of curr selection,Ctrl+Shift+L,,,,,, ,,,Select all occur of curr word,Ctrl+F2,,,,,,
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.