Created
February 14, 2011 20:40
-
-
Save stevehorn/826502 to your computer and use it in GitHub Desktop.
Autohotkey For empty anonymous function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;Executed by typing fx<space> | |
:*:fx :: | |
;Send left curly | |
SendEvent function() {{} | |
Send {Enter} | |
;Send right curly | |
SendEvent {}} | |
Send {Up} | |
Send {End} | |
Send {Enter} | |
return | |
============== | |
prints: | |
function() { | |
/*Cursor lands here*/ | |
} |
You should add a newline after the end, so the cursor ends up on the next line. Don't have your first statement be on the same line as the function declaration. :)
Corey, right you are.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Autohotkey script for creating anonymous functions in javascript.