 
 (use-package compile
   :commands compile
-  :config
+  :general
+    (:states '(normal visual emacs)
+    :prefix "<SPC>"
+      "o"          #'me:switch-to-compile-buffer
+      "r"          #'recompile)
+  :config
+  (defun me:switch-to-compile-buffer ()
+    (interactive)
+    (switch-to-buffer "*compilation*"))
   (defun me:rotate-skip-threshold ()
     (interactive)
     (compilation-set-skip-threshold

  :config
  (push "compile_commands.json" projectile-project-root-files)
  (push "build" projectile-globally-ignored-directories)
  (use-package persp-projectile :demand :config)
  (projectile-mode 1))

(use-package counsel-projectile
  :commands (counsel-projectile-find-file)
  :config
  ;; version of counsel-projectile-find-file which uses
  ;; projectile-current-project-files instead of the fontified

  (me:add-hook-with-delay 'visual-line-mode-hook 3 #'adaptive-wrap-prefix-mode))

(use-package miniedit
  :general
  (:keymap minibuffer-local-map
   "C-c e" #'miniedit)
  :config
  (miniedit-mode t)
  :init)
