diff --git a/core/core-editor.el b/core/core-editor.el index c6f3e41ed..d88f401e1 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -22,7 +22,7 @@ scroll-conservatively 1001 scroll-preserve-screen-position t - hscroll-step 1 + hscroll-step 1 hscroll-margin 1 shift-select-mode t diff --git a/core/core-evil.el b/core/core-evil.el index 80d7c3033..a2f2750d9 100644 --- a/core/core-evil.el +++ b/core/core-evil.el @@ -387,7 +387,7 @@ (add-hook! emacs-lisp-mode (setq evil-surround-pairs-alist - (cons '(?\` . ("`" . "*")) evil-surround-pairs-alist))) + (cons '(?\` . ("`" . "'")) evil-surround-pairs-alist))) (add-hook! python-mode (setq evil-surround-pairs-alist diff --git a/core/core-popup.el b/core/core-popup.el index 8b78f9e51..0c9aaf2cd 100644 --- a/core/core-popup.el +++ b/core/core-popup.el @@ -60,7 +60,7 @@ ;; Helm tries to clean up after itself, but shackle has already done this. This fixes ;; that. To reproduce, add a helm rule in `shackle-rules', open two splits ;; side-by-side, move to the buffer on the right and invoke helm. It will close all - ;; but th left-most buffer. + ;; but the left-most buffer. (setq-default helm-split-window-in-side-p t)) (after! helm-swoop @@ -151,6 +151,7 @@ (setq narf-popup-windows (delete window narf-popup-windows))) (defun narf/popup-p (&optional window) + "Whether WINDOW is a shackle popup window or not." (and narf-popup-windows (-any? (lambda (w) (if (window-live-p w) t (narf--popup-remove w) nil)) @@ -160,11 +161,13 @@ t))) (defun narf/popup-buffer (buffer &optional plist) + "Display BUFFER in a shackle popup." (let ((buffer-name (if (stringp buffer) buffer (buffer-name buffer)))) (shackle-display-buffer (get-buffer-create buffer-name) nil (or plist (shackle-match buffer-name))))) (defun narf/popup-close (&optional window dont-kill dont-close-all) + "Find and close the currently active popup (if available)." (interactive) (when (not window) (if (narf/popup-p (selected-window)) @@ -186,26 +189,29 @@ (delete-window window))) (defun narf-popup-close-all (&optional dont-kill-buffers) + "Closes all popup windows (and kills the buffers if DONT-KILL-BUFFERS is non-nil)" (interactive) (mapc (lambda (w) (narf/popup-close w dont-kill-buffers)) narf-popup-windows) (setq narf-popup-windows nil)) - ;;;;; - + ;; (defun narf/popup-toggle () + "Toggles the popup window, reopening the last popup (if available)." (interactive) (if (narf/popup-p) (narf/popup-close t) (narf/popup-last-buffer))) (defun narf/popup-last-buffer () + "Pop up the last popup buffer." (interactive) (if shackle-last-buffer (narf/popup-buffer shackle-last-buffer) (narf/popup-messages))) (defun narf/popup-messages () + "Pop up the *Messages* buffer." (interactive) (narf/popup-buffer "*Messages*") (with-current-buffer "*Messages*" diff --git a/core/core-sessions.el b/core/core-sessions.el index f4ca18fd5..cad63adb8 100644 --- a/core/core-sessions.el +++ b/core/core-sessions.el @@ -9,7 +9,6 @@ (use-package workgroups2 :when (display-graphic-p) :init - (add-hook! after-init 'workgroups-mode) (setq-default wg-session-file (expand-file-name "wg-default" narf-temp-dir) wg-workgroup-directory (expand-file-name "workgroups" narf-temp-dir) @@ -44,6 +43,8 @@ (candidates . wg-workgroup-names) (action . narf/wg-helm-switch-to-workgroup))) + (add-hook! emacs-startup (workgroups-mode +1)) + :config (unless (file-exists-p wg-workgroup-directory) (mkdir wg-workgroup-directory)) diff --git a/core/core-vars.el b/core/core-vars.el index d5f4ea70d..a55b54dc5 100644 --- a/core/core-vars.el +++ b/core/core-vars.el @@ -5,8 +5,6 @@ :group 'convenience :prefix 'narf-) -;; TODO Make these defcustom's - (defvar narf-leader-prefix "," "Prefix key for maps") (defvar narf-localleader-prefix "\\" "Prefix key for maps") diff --git a/modules/module-text.el b/modules/module-text.el index edebc8ad6..965aa9942 100644 --- a/modules/module-text.el +++ b/modules/module-text.el @@ -10,9 +10,6 @@ :init (add-hook! markdown-mode 'narf|enable-hard-wrap) :config - (add-hook! markdown-mode - (exmap! "preview" 'narf/markdown-preview) - (exmap! "export" 'narf:org-export)) (map! (:map markdown-mode-map "" nil "" nil diff --git a/modules/module-tmux.el b/modules/module-tmux.el index 7b8ddead6..99bfc5a90 100644 --- a/modules/module-tmux.el +++ b/modules/module-tmux.el @@ -48,11 +48,6 @@ (when (evil-ex-p) (message "[Tmux] %s" command)))) -;;;###autoload -(defun narf/tmux-new-window () - (interactive) - (tmux "tmux new-window" t)) - ;;;###autoload (defun narf/tmux-cd-to-here (&optional dir) (interactive)