summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/km-python.el18
1 files changed, 17 insertions, 1 deletions
diff --git a/conf/km-python.el b/conf/km-python.el
index f3d1b08..ce7aa53 100644
--- a/conf/km-python.el
+++ b/conf/km-python.el
@@ -11,8 +11,24 @@
(interactive)
(km/shebang "python"))
+(defconst km/python-analysis-imports
+ "import sys
+import numpy as np
+import pandas as pd
+import matplotlib.pyplot as plt
+from matplotlib.ticker import MaxNLocator
+
+from colors import brew, fgry, bgry"
+ )
+
+(defun km/python-insert-analysis-imports ()
+ "Common imports for analysis scripts"
+ (interactive)
+ (insert km/python-analysis-imports))
+
(defun km/python-hook ()
(local-set-key (kbd "C-c p r") 'km/python-random-assignment)
(local-set-key (kbd "C-c p e") 'km/python-sysexit)
- (local-set-key (kbd "C-c p s") 'km/python-shebang))
+ (local-set-key (kbd "C-c p s") 'km/python-shebang)
+ (local-set-key (kbd "C-c p a") 'km/python-insert-analysis-imports))
(add-hook 'python-mode-hook 'km/python-hook)