Skip to content

Instantly share code, notes, and snippets.

@ae6rt
Created March 14, 2017 13:13
Show Gist options
  • Save ae6rt/b04bb7612d3d9ce34e7a23d0e1fbf2b4 to your computer and use it in GitHub Desktop.
Save ae6rt/b04bb7612d3d9ce34e7a23d0e1fbf2b4 to your computer and use it in GitHub Desktop.
Go test table keyboard macro
;; keyboard macros
;; Go unit test table []struct{}{}
(fset 'testtable
(lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ("var tests = []struct{^M}{^M{},^M}^Mfor testNumber, test := range tests {} " 0 "%d")) arg)))
(global-set-key (kbd "C-x C-k 0") 'testtable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment