 (defun my/set-gc-threshold ()
   "Reset `gc-cons-threshold' to its default value."
   (setq gc-cons-threshold 800000))
+
+(defun remove-elc-on-save ()
+  "If you're saving an elisp file, likely the .elc is no longer valid."
+  (add-hook 'after-save-hook
+            (lambda ()
+              (if (file-exists-p (concat buffer-file-name "c"))
+                  (delete-file (concat buffer-file-name "c"))))
+            nil
+            t))
+
+(defun my-compilation-hook ()
+  "Make sure that the compile window is splitting vertically"
+  (progn
+    (if (not (get-buffer-window "*compilation*"))
+        (progn
+          (split-window-vertically)
+          )
+      )
+    )
+  )
 
 (custom-set-variables
  ;; custom-set-variables was added by Custom.


(use-package smartparens
  :commands (smartparens-mode)
  :init (add-hook 'prog-mode-hook 'smartparens-mode)
  :config (sp-local-pair 'prog-mode "{" nil :post-handlers '((my/create-newline-and-enter-sexp "RET"))))

;; Go
(use-package go-mode

    (key-seq-define-global ",b" 'ido-switch-buffer)
    (key-seq-define-global ",s" 'my/save-buffers)
    (key-seq-define-global ",v" 'split-window-horizontally)
    (key-seq-define-global ",q" 'my/kill-or-close)
    (key-seq-define-global ",w" 'delete-other-windows)
    (key-seq-define-global ",c" 'comment-dwim)
    (key-seq-define-global ",d" 'counsel-imenu)
