diff --git a/TODO.org b/TODO.org index 4d19d1046..3bce5d5ed 100644 --- a/TODO.org +++ b/TODO.org @@ -89,7 +89,7 @@ + [ ] twitter + [ ] present -** 2.0.3 [23/46] +** 2.0.3 [25/48] + [ ] Test ~package-autoremove~ + [ ] tools/upload: add ~+upload/open-remote-file~ command to open current file on the remote (with TRAMP) @@ -119,6 +119,8 @@ + [ ] syntax highlighter for ~+regex-mode~ (plus make it a major mode) + [ ] README.org + [ ] Use ~make-process~ daemon approach rather than ~call-process~ ++ [X] feature/evil: make ~d~ operator invoke ~wgrep-mark-deletion~ in wgrep buffers ++ [X] feature/version-control: improve magit+shackle integration; magit links open separate popups. They should open within the same popup. + [X] ui/doom: fix nav-flash on evil-multiedit or in eshell/term buffers + [X] core-os: don't use GTK tooltips (ugly!) + [X] ui/doom-modeline: reduce excess whitespace on right of flycheck segment diff --git a/core/core-popups.el b/core/core-popups.el index 1e40251e0..737318ec4 100644 --- a/core/core-popups.el +++ b/core/core-popups.el @@ -442,7 +442,6 @@ the command buffer." ;; ;; By handing neotree over to shackle, which is better integrated into the ;; rest of my config (and persp-mode), this is no longer a problem. - (setq neo-display-action '(+evil-neotree-display-fn)) (set! :popup " *NeoTree*" :align 'left :size 25) (defun +evil-neotree-display-fn (buf _alist) @@ -450,6 +449,7 @@ the command buffer." (let ((win (doom-popup-buffer buf))) (setq neo-global--buffer (window-buffer win) neo-global--window win))) + (setq neo-display-action '(+evil-neotree-display-fn)) (defun +evil|neotree-fix-popup () "Repair neotree state whenever its popup state is restored. This ensures diff --git a/modules/feature/evil/config.el b/modules/feature/evil/config.el index aedc1fd67..b4baa9653 100644 --- a/modules/feature/evil/config.el +++ b/modules/feature/evil/config.el @@ -136,7 +136,11 @@ across windows." (advice-add #'evil-ex-replace-special-filenames :override #'+evil*ex-replace-special-filenames) - ;; Add extra argument types that highlight matches in the current buffer. + ;; By default :g[lobal] doesn't highlight matches in the current buffer. I've + ;; got to write my own argument type and interactive code to get it to do so. + ;; While I'm at it, I use this to write an :al[ign] command as a wrapper + ;; around `align-regexp'. + ;; TODO Must be simpler way to do this (evil-ex-define-argument-type buffer-match :runner +evil-ex-buffer-match) (evil-ex-define-argument-type global-match :runner +evil-ex-global-match) @@ -163,6 +167,8 @@ across windows." (evil-transform-vim-style-regexp pattern))) 1 1)) + ;; Must be aggressively defined here, otherwise the above highlighting won't + ;; work on first invocation (evil-ex-define-cmd "g[lobal]" #'+evil:global) (evil-ex-define-cmd "al[ign]" #'+evil:align)) diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index a6dcfdb02..c8221a7b4 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -42,14 +42,15 @@ :n "]l" #'markdown-previous-link :n "gf" #'markdown-follow-thing-at-point :i "M--" #'markdown-insert-hr - (:localleader - :nv "o" #'markdown-open - :nv "b" #'markdown-preview - (:prefix "i" - :nv "t" #'markdown-toc-generate-toc - :nv "i" #'markdown-insert-image - :nv "l" #'markdown-insert-link - :nv "L" #'markdown-insert-reference-link-dwim)))) + + :localleader + :nv "o" #'markdown-open + :nv "b" #'markdown-preview + (:prefix "i" + :nv "t" #'markdown-toc-generate-toc + :nv "i" #'markdown-insert-image + :nv "l" #'markdown-insert-link + :nv "L" #'markdown-insert-reference-link-dwim))) (def-package! markdown-toc diff --git a/modules/private/hlissner/+bindings.el b/modules/private/hlissner/+bindings.el index a9560cab8..eb5eac586 100644 --- a/modules/private/hlissner/+bindings.el +++ b/modules/private/hlissner/+bindings.el @@ -54,10 +54,10 @@ "M-9" (λ! (+workspace/switch-to 8)) "M-0" #'+workspace/switch-to-last ;; Basic escape keys for emacs mode - :e "C-h" #'evil-window-left - :e "C-j" #'evil-window-down - :e "C-k" #'evil-window-up - :e "C-l" #'evil-window-right + "C-h" #'evil-window-left + "C-j" #'evil-window-down + "C-k" #'evil-window-up + "C-l" #'evil-window-right "M-r" #'+eval/buffer "M-S-r" #'+eval/region-and-replace diff --git a/modules/private/hlissner/+commands.el b/modules/private/hlissner/+commands.el index 80b44d413..004a2eab3 100644 --- a/modules/private/hlissner/+commands.el +++ b/modules/private/hlissner/+commands.el @@ -1,88 +1,92 @@ (defalias 'ex! 'evil-ex-define-cmd) +;;; Commands defined elsewhere +;;(ex! "al[ign]" #'+evil:align) +;;(ex! "g[lobal]" #'+evil:global) + ;;; Custom commands ;; Emacs utilities -(ex! "bc[omp]" '+hlissner:byte-compile) -(ex! "clog" 'global-command-log-mode) -(ex! "minor" 'describe-minor-mode) ; list minor modes -(ex! "re[load]" 'doom/reload) -(ex! "re[load]au" 'doom/reload-autoloads) +(ex! "bc[omp]" #'+hlissner:byte-compile) +(ex! "clog" #'global-command-log-mode) +(ex! "minor" #'describe-minor-mode) ; list minor modes +(ex! "re[load]" #'doom/reload) +(ex! "re[load]au" #'doom/reload-autoloads) ;; Editing -(ex! "@" '+evil:macro-on-all-lines) ; TODO Test me -(ex! "enhtml" '+web:encode-html-entities) -(ex! "dehtml" '+web:decode-html-entities) -(ex! "ie[dit]" 'evil-multiedit-ex-match) -(ex! "na[rrow]" '+evil:narrow-buffer) -(ex! "retab" '+evil:retab) +(ex! "@" #'+evil:macro-on-all-lines) ; TODO Test me +(ex! "enhtml" #'+web:encode-html-entities) +(ex! "dehtml" #'+web:decode-html-entities) +(ex! "ie[dit]" #'evil-multiedit-ex-match) +(ex! "na[rrow]" #'+evil:narrow-buffer) +(ex! "retab" #'+evil:retab) ;; External resources -;; TODO (ex! "db" 'doom:db) -;; TODO (ex! "dbu[se]" 'doom:db-select) -;; TODO (ex! "go[ogle]" 'doom:google-search) -(ex! "http" 'httpd-start) ; start http server -(ex! "repl" '+eval:repl) ; invoke or send to repl +;; TODO (ex! "db" #'doom:db) +;; TODO (ex! "dbu[se]" #'doom:db-select) +;; TODO (ex! "go[ogle]" #'doom:google-search) +(ex! "http" #'httpd-start) ; start http server +(ex! "repl" #'+eval:repl) ; invoke or send to repl ;; TODO (ex! "rx" 'doom:regex) ; open re-builder -(ex! "sh[ell]" '+eshell:run) -(ex! "t[mux]" '+tmux:run) ; send to tmux -(ex! "tcd" '+tmux:cd-here) ; cd to default-directory in tmux -(ex! "x" '+doom:scratch-buffer) +(ex! "sh[ell]" #'+eshell:run) +(ex! "t[mux]" #'+tmux:run) ; send to tmux +(ex! "tcd" #'+tmux:cd-here) ; cd to default-directory in tmux +(ex! "x" #'+doom:scratch-buffer) ;; GIT -(ex! "gist" '+gist:send) ; send current buffer/region to gist -(ex! "gistl" '+gist:list) ; list gists by user -(ex! "gbrowse" '+vcs/git-browse) ; show file in github/gitlab -(ex! "gissues" '+vcs/git-browse-issues) ; show github issues -(ex! "git" 'magit-status) ; open magit status window -(ex! "gstage" 'magit-stage) -(ex! "gunstage" 'magit-unstage) +(ex! "gist" #'+gist:send) ; send current buffer/region to gist +(ex! "gistl" #'+gist:list) ; list gists by user +(ex! "gbrowse" #'+vcs/git-browse) ; show file in github/gitlab +(ex! "gissues" #'+vcs/git-browse-issues) ; show github issues +(ex! "git" #'magit-status) ; open magit status window +(ex! "gstage" #'magit-stage) +(ex! "gunstage" #'magit-unstage) ;; TODO :gblame ;; TODO :grevert ;; TODO :gblame ;; Dealing with buffers -(ex! "clean[up]" 'doom/cleanup-buffers) -(ex! "k[ill]" 'doom/kill-this-buffer) -(ex! "k[ill]all" '+hlissner:kill-all-buffers) -(ex! "k[ill]m" '+hlissner:kill-matching-buffers) -(ex! "k[ill]o" 'doom/kill-other-buffers) -(ex! "l[ast]" 'doom/popup-restore) -(ex! "m[sg]" 'view-echo-area-messages) -(ex! "pop[up]" 'doom/popup) ; open current buffer in popup +(ex! "clean[up]" #'doom/cleanup-buffers) +(ex! "k[ill]" #'doom/kill-this-buffer) +(ex! "k[ill]all" #'+hlissner:kill-all-buffers) +(ex! "k[ill]m" #'+hlissner:kill-matching-buffers) +(ex! "k[ill]o" #'doom/kill-other-buffers) +(ex! "l[ast]" #'doom/popup-restore) +(ex! "m[sg]" #'view-echo-area-messages) +(ex! "pop[up]" #'doom/popup) ; open current buffer in popup ;; Project navigation -(ex! "a" 'projectile-find-other-file) -(ex! "ag" '+ivy:ag) -(ex! "agc[wd]" '+ivy:ag-cwd) -(ex! "rg" '+ivy:rg) -(ex! "rgc[wd]" '+ivy:rg-cwd) -(ex! "cd" '+hlissner:cd) -(ex! "sw[iper]" '+ivy:swiper) ; in-file search +(ex! "a" #'projectile-find-other-file) +(ex! "ag" #'+ivy:ag) +(ex! "agc[wd]" #'+ivy:ag-cwd) +(ex! "rg" #'+ivy:rg) +(ex! "rgc[wd]" #'+ivy:rg-cwd) +(ex! "cd" #'+hlissner:cd) +(ex! "sw[iper]" #'+ivy:swiper) ; in-file search ;; Project tools -(ex! "build" '+eval/build) -(ex! "debug" '+debug/run) -(ex! "er[rors]" 'flycheck-list-errors) -(ex! "todo" '+ivy:todo) +(ex! "build" #'+eval/build) +(ex! "debug" #'+debug/run) +(ex! "er[rors]" #'flycheck-list-errors) +(ex! "todo" #'+ivy:todo) ;; File operations -(ex! "mv" '+evil:move-this-file) -(ex! "rm" '+evil:delete-this-file) +(ex! "mv" #'+evil:move-this-file) +(ex! "rm" #'+evil:delete-this-file) ;; Sessions/tabs -(ex! "sclear" '+workspace/kill-session) -(ex! "sl[oad]" '+workspace:load-session) -(ex! "ss[ave]" '+workspace:save-session) -(ex! "tabc[lose]" '+workspace:delete) -(ex! "tabclear" 'doom/kill-all-buffers) -(ex! "tabl[ast]" '+workspace/switch-to-last) -(ex! "tabload" '+workspace:load) -(ex! "tabn[ew]" '+workspace:new) -(ex! "tabn[ext]" '+workspace:switch-next) -(ex! "tabp[rev]" '+workspace:switch-previous) -(ex! "tabr[ename]" '+workspace:rename) -(ex! "tabs" '+workspace/display) -(ex! "tabsave" '+workspace:save) +(ex! "sclear" #'+workspace/kill-session) +(ex! "sl[oad]" #'+workspace:load-session) +(ex! "ss[ave]" #'+workspace:save-session) +(ex! "tabc[lose]" #'+workspace:delete) +(ex! "tabclear" #'doom/kill-all-buffers) +(ex! "tabl[ast]" #'+workspace/switch-to-last) +(ex! "tabload" #'+workspace:load) +(ex! "tabn[ew]" #'+workspace:new) +(ex! "tabn[ext]" #'+workspace:switch-next) +(ex! "tabp[rev]" #'+workspace:switch-previous) +(ex! "tabr[ename]" #'+workspace:rename) +(ex! "tabs" #'+workspace/display) +(ex! "tabsave" #'+workspace:save) ;; Org-mode -(ex! "org" '+org:capture) +(ex! "org" #'+org:capture) diff --git a/modules/private/hlissner/config.el b/modules/private/hlissner/config.el index d6be19f72..cdd9011e3 100644 --- a/modules/private/hlissner/config.el +++ b/modules/private/hlissner/config.el @@ -36,7 +36,7 @@ (defun ,fn-sym (&rest _) (define-key evil-motion-state-map (kbd "SPC") ',next-func) (define-key evil-motion-state-map (kbd "S-SPC") ',prev-func)) - (advice-add ',command :before ',fn-sym)))) + (advice-add #',command :before #',fn-sym)))) (after! evil ;; n/N