summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <meyerkya@gmail.com>2013-07-19 18:51:37 -0400
committerKyle Meyer <meyerkya@gmail.com>2013-07-19 18:51:37 -0400
commit025f5f02180a80f7f36494f8a670755425f8eb32 (patch)
tree65e4f2fe106d9bd7cd3b3aed9b634282ea8196e8
parent23b060146020242ae8d87d15dd538729e3eed2ce (diff)
downloademacs.d-025f5f02180a80f7f36494f8a670755425f8eb32.tar.gz
add py.test compiling keybindings
-rw-r--r--init/km-python.el10
1 files changed, 10 insertions, 0 deletions
diff --git a/init/km-python.el b/init/km-python.el
index 2463ee5..d0ce6bc 100644
--- a/init/km-python.el
+++ b/init/km-python.el
@@ -11,3 +11,13 @@
"';'.join(module_completion('''%s'''))\n"
python-shell-completion-string-code
"';'.join(get_ipython().Completer.all_completions('''%s'''))\n"))
+
+(defun km/python-hook ()
+ (local-set-key (kbd "C-c m t") '(lambda ()
+ (interactive)
+ (compile "py.test")))
+ (local-set-key (kbd "C-c m T") '(lambda ()
+ (interactive)
+ (compile "py.test2"))))
+
+(add-hook 'python-mode-hook 'km/python-hook)