; Shortcut keys Matlab should already have, but doesn't ; Author Samuel A. Inverso ; URL: http://www.saminverso.com ; CTRL+F9 Execute current line in the matlab editor ; ALT+CTRL+F9 Execute current line, strip the ';', if it exists, ; executes it, and puts the ';' back ; F10 Exectue current line, advance to next line ; F11 Strip, execute, advance ; ; Revisions ; 20090219 Sam Moved code to functions, add F10, and F11 to execute and advance ; 20081028 Sam Modifiled Shift+Ctrl+F9 to undo the semicolon strip ; so that the matlab editor doesn't consider that a ; file change and prompt to save if no other changes ; were made ; 20080919 Sam Initial Verson ; ; F U N C T I O N S ; ; Highlight the current line end execute it in the matlab editor executeLine(){ Send {Home}+{End}{F9}{Esc} } ; Highlights the current, strips the ';', if it exists, executes it, and puts the ';' back stripSemiColonAndExecuteLine(){ Send {Home}+{End}^{c} origLine := clipboard ; strip the trailing semicolon semiColPos := RegExMatch(origLine,"(.*);\s*$",subPat) if(semiColPos > 0) { clipboard := subPat1 Send ^{v} } executeLine() ; put back the original line if(semiColPos > 0) { Send ^{z} } } ; ; H O T K E Y S ; #IfWinActive Editor - ^F9:: executeLine() ; Highlight the current line end execute it in the matlab editor +^F9:: stripSemiColonAndExecuteLine() ; Highlights the current, strips the ';', if it exists, executes it, and puts the ';' back F10:: executeLine() ; execute and advance to next line Send {Down} return F11:: stripSemiColonAndExecuteLine() ; strip, execute, advance Send {Down} return