ymg3 Posted Sunday at 08:06 PM Posted Sunday at 08:06 PM If you use notepad+ as an editor for Autolisp, the CTRL+ALT+b leaves a lot to be desired when it comes to selecting between brackets. The VLIDE double-click is much more satisfying. So here is an AutoHotKey script that gives you this functionnality while preserving the normal Dbl-Click of notepad+: #Requires AutoHotkey v2.0 #SingleInstance Off ; 1. Set up a unique communication highway (MsgNumber 0x401) OnMessage(0x401, ReceiveCloseSignal) ReceiveCloseSignal(wParam, lParam, msg, hwnd) { ExitApp } ; 2. Find any running old instance (ignoring itself) and send it the "Self-Destruct" signal DetectHiddenWindows True if (oldScriptHwnd := WinExist(A_ScriptFullPath " ahk_class AutoHotkey")) { if (oldScriptHwnd != A_ScriptHwnd) { ; Ensure the script doesn't close itself! PostMessage(0x401, 0, 0, , "ahk_id " oldScriptHwnd) WinWaitClose("ahk_id " oldScriptHwnd, , 2) } } ; 3. Automatically relaunch the script using UI Access to bypass UAC entirely if !A_IsCompiled && !InStr(A_AhkPath, "_UIA.exe") { uiaPath := RegExReplace(A_AhkPath, "\.exe$", "_UIA.exe") if FileExist(uiaPath) { try { Run('"' uiaPath '" "' A_ScriptFullPath '"') ExitApp } } } ; 4. Your Application-Specific Hotkeys #HotIf WinActive("ahk_class Notepad++") ~LButton:: { static lastClick := 0 currentClick := A_TickCount if (currentClick - lastClick < DllCall("GetDoubleClickTime")) { KeyWait("LButton") Sleep(60) SendEvent("^!b") lastClick := 0 } else { lastClick := currentClick } } #HotIf Link to download AutoHotKey https://www.autohotkey.com also available on Microsoft app store (Free) NppBrackets.ahk 1 Quote
Danielm103 Posted Monday at 02:38 AM Posted Monday at 02:38 AM I use this in visual studio to toggle between header and source. also since I'm a southpaw, I use home and end for copy paste autohotkey is the GOAT! #z::Run www.autohotkey.com ;ALT + XX ; home::send ^c ; end::send ^v ; #IfWinActive ahk_exe devenv.exe ;PgUp::SendRaw `,DS.ARGS() ;misc command ;PgDn::SendRaw `,DS.ARGS({"val:type"}) ;misc command Insert::send ^k^o ;toggle header/source Delete::send ^a^k^f{Esc} ;select all and format #IfWinActive 2 1 Quote
Steven P Posted Monday at 08:42 AM Posted Monday at 08:42 AM Never thought about that - I always still use ctrl+ V / C - means I have to let go of the mouse every now and then 1 Quote
Paul Li Posted yesterday at 06:56 PM Posted yesterday at 06:56 PM FYI: When running VS Code to select everything including the parenthesis, When near the beginning of the code: Click position right in front of the open parenthesis, then hit the following keyboard combinations Shift+Ctrl+Alt then Down Arrow When near the end of the code: Click position right after the close parenthesis, then hit the following keyboard combinations Shift+Ctrl+Alt then Up Arrow Quote
ymg3 Posted 21 hours ago Author Posted 21 hours ago (edited) Hi Paul, When a keyboard shortcut requires 4 keys, I'm not so sure we should consider it a shortcut anymore. Thanks, for the info nonetheless. ymg Edited 21 hours ago by ymg3 typo Quote
BIGAL Posted 20 hours ago Posted 20 hours ago (edited) I use Notepad++ so had a look, interesting when you click the little - button on the left it shrinks text paragraphs, you can select all that is shrunk using CTRL C then Ctrl V but you need a dummy next line for it to work. Used AI found answer no dummy line needed. Pick to right of + sign use "Begin/end select" (defun col1 ( / l) (setq x 1) (repeat (length ah:butlst) (setq l (strcat "1Rb" (rtos x 2 0))) (if (= (get_tile l) "1" ) (setq ah:col1 x) ) (setq x (+ x 1)) ) (princ) ) Edited 20 hours ago by BIGAL Quote
SLW210 Posted 10 hours ago Posted 10 hours ago 8 hours ago, BIGAL said: I use Notepad++ so had a look, interesting when you click the little - button on the left it shrinks text paragraphs, you can select all that is shrunk using CTRL C then Ctrl V but you need a dummy next line for it to work. Used AI found answer no dummy line needed. Pick to right of + sign use "Begin/end select" (defun col1 ( / l) (setq x 1) (repeat (length ah:butlst) (setq l (strcat "1Rb" (rtos x 2 0))) (if (= (get_tile l) "1" ) (setq ah:col1 x) ) (setq x (+ x 1)) ) (princ) ) Pick to right of + sign use "Begin/end select" is what I do, though I don't use Notepad++ very much. The CTRL+ALT+b is pretty easy for me if I am using a right-hand mouse, like Daniel I would have to figure out a good shortcut if using a mouse left-handed. I used to use a lot of custom shortcuts/ inputs, but at one point I was working on various computers doing things and would have a "brain freeze" trying to figure out how it was normally done on some things so got out of the habit. Now I don't really do much that's not on one of my computers or work computer, though occasionally I get an email or call on how to do something, so probably a good time to go back to using shortcuts. Not sure what everybody else has, but my MS VS Code, I just select just inside a bracket and double-click to select all between the related brackets. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.