From 1de3153eee916b18a069ad08519a067000e35c2e Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 4 Nov 2022 04:36:54 +0000 Subject: attic --- attic/elisp/misc.el | 47 +++++++++++++++++++++++++++++++++++++++++++++++ init.el | 47 ----------------------------------------------- 2 files changed, 47 insertions(+), 47 deletions(-) diff --git a/attic/elisp/misc.el b/attic/elisp/misc.el index dda3afe..b6a71cc 100644 --- a/attic/elisp/misc.el +++ b/attic/elisp/misc.el @@ -45,6 +45,20 @@ (idris-stay-in-current-window-on-compiler-error t))) (jao-define-attached-buffer "^\\*idris.*") +;;;; Racket +(use-package racket-mode + :ensure t + :init (setq racket-show-functions '(racket-show-echo-area) + racket-documentation-search-location 'local) + :config + (jao-define-attached-buffer "\\`\\*Racket REPL") + (jao-define-attached-buffer "\\`\\*Racket Describe" 0.5) + (add-hook 'racket-mode-hook #'paredit-mode) + (require 'racket-xp) + (add-hook 'racket-mode-hook #'racket-xp-mode) + :bind (:map racket-xp-mode-map (("C-c C-S-d" . racket-xp-documentation) + ("C-c C-d" . racket-xp-describe)))) + ;;; smart scan (use-package smartscan :ensure t @@ -114,6 +128,39 @@ ("M-O" . ace-swap-window) ("C-x 4 t" . ace-swap-window))) +;;; switch window +(use-package switch-window + :ensure t + :custom ((switch-window-minibuffer-shortcut ?z) + (switch-window-background t) + (switch-window-shortcut-style 'qwerty) + (switch-window-shortcut-appearance 'text) + (switch-window-timeout 7) + (switch-window-threshold 2)) + :config + (defun jao-switch-window--then (prompt cmd) + (let ((f `(lambda () + (let ((default-directory ,default-directory)) + (call-interactively ',cmd))))) + (switch-window--then prompt f f))) + + (defun jao-switch-window-then-dired () + (interactive) + (jao-switch-window--then "Find directory" 'dired)) + + (defun jao-switch-window-then-find-file () + (interactive) + (jao-switch-window--then "Find file" 'find-file)) + + (defun jao-switch-window-then-consult-buffer () + (interactive) + (jao-switch-window--then "Switch to buffer" 'consult-buffer)) + + :bind (("s-o" . switch-window) + ("C-x 4 d" . jao-switch-window-then-dired) + ("C-x 4 f" . jao-switch-window-then-find-file) + ("C-x 4 b" . jao-switch-window-then-consult-buffer))) + ;;; git helpers (use-package dired-git-info :ensure t diff --git a/init.el b/init.el index 199afd1..d8b5e55 100644 --- a/init.el +++ b/init.el @@ -995,39 +995,6 @@ (define-key ctl-x-4-map (kbd "t") 'transpose-windows) -;;;; switch window -(use-package switch-window - :ensure t - :custom ((switch-window-minibuffer-shortcut ?z) - (switch-window-background t) - (switch-window-shortcut-style 'qwerty) - (switch-window-shortcut-appearance 'text) - (switch-window-timeout 7) - (switch-window-threshold 2)) - :config - (defun jao-switch-window--then (prompt cmd) - (let ((f `(lambda () - (let ((default-directory ,default-directory)) - (call-interactively ',cmd))))) - (switch-window--then prompt f f))) - - (defun jao-switch-window-then-dired () - (interactive) - (jao-switch-window--then "Find directory" 'dired)) - - (defun jao-switch-window-then-find-file () - (interactive) - (jao-switch-window--then "Find file" 'find-file)) - - (defun jao-switch-window-then-consult-buffer () - (interactive) - (jao-switch-window--then "Switch to buffer" 'consult-buffer)) - - :bind (("s-o" . switch-window) - ("C-x 4 d" . jao-switch-window-then-dired) - ("C-x 4 f" . jao-switch-window-then-find-file) - ("C-x 4 b" . jao-switch-window-then-consult-buffer))) - ;;;; winner mode (winner-mode 1) @@ -2359,20 +2326,6 @@ (swi "swipl") (t "prolog"))))) -;;;; Racket -(use-package racket-mode - :ensure t - :init (setq racket-show-functions '(racket-show-echo-area) - racket-documentation-search-location 'local) - :config - (jao-define-attached-buffer "\\`\\*Racket REPL") - (jao-define-attached-buffer "\\`\\*Racket Describe" 0.5) - (add-hook 'racket-mode-hook #'paredit-mode) - (require 'racket-xp) - (add-hook 'racket-mode-hook #'racket-xp-mode) - :bind (:map racket-xp-mode-map (("C-c C-S-d" . racket-xp-documentation) - ("C-c C-d" . racket-xp-describe)))) - ;;;; Python (use-package virtualenvwrapper :ensure t -- cgit v1.2.3