   (when (not (one-window-p))
     (delete-window)))
 
+;; org-babel display results in new buffer
+;; credit: https://emacs.stackexchange.com/a/27190
+(defun ab/org-babel-to-buffer ()
+  "A function to efficiently feed babel code block result to a separate buffer"
+  (interactive)
+  (org-open-at-point)
+  (org-babel-remove-result)
+  (with-current-buffer "*Org Babel Results*"
+    (when (string-prefix-p "{" (buffer-substring 1 2))
+      (json-mode))
+    (evil-motion-state)))
+(defun ab/org-mode-config ()
+  "To use with `org-mode-hook'"
+  (local-set-key (kbd "C-c C-S-c") 'ab/org-babel-to-buffer))
+(add-hook 'org-mode-hook 'ab/org-mode-config)
+
 ;; Toggle Window Maximize
 ;; Credit: https://github.com/hlissner/doom-emacs/blob/59a6cb72be1d5f706590208d2ca5213f5a837deb/core/autoload/ui.el#L106
 (defvar doom--maximize-last-wconf nil)

          (prog1 (current-window-configuration)
            (delete-other-windows)))))

;;; Font
;; Set default font
(set-face-attribute 'default nil
                    :family "JetBrains Mono"
                    :height 140 ;; this is 1/10 pt e.g. 140 = 14pt
                    :weight 'normal
                    :width 'normal)

;;; Package configs
;; boostrap straight.el

(use-package popwin
  :ensure t)
(popwin-mode 1)


;;; EVIL mode
