Improve workgroups2 tab emulation
This commit is contained in:
parent
af9003e529
commit
54c2541777
4 changed files with 45 additions and 34 deletions
|
@ -63,7 +63,21 @@ lib/defuns-workgroups.el.")
|
|||
(advice-add 'wg-change-modeline :override 'ignore)
|
||||
|
||||
;; Don't remember popup windows
|
||||
(add-hook! kill-emacs 'narf-popup-close-all))
|
||||
(add-hook! kill-emacs 'narf-popup-close-all)
|
||||
|
||||
;; This helps abstract some of the underlying functions away, just in case I want to
|
||||
;; switch to a different package in the future, like persp-mode, eyebrowse or wconf.
|
||||
(defalias 'narf/helm-tabs 'narf:helm-wg)
|
||||
(defalias 'narf/close-window-or-tab 'narf/close-window-or-workgroup)
|
||||
(defalias 'narf:switch-to-tab 'narf:switch-to-workgroup-at-index)
|
||||
(defalias 'narf/tab-display 'narf/workgroup-display)
|
||||
(defalias 'narf:tab-create 'narf:workgroup-new)
|
||||
(defalias 'narf:tab-rename 'narf:workgroup-rename)
|
||||
(defalias 'narf:kill-tab 'narf:workgroup-delete)
|
||||
(defalias 'narf:kill-other-tabs 'narf:kill-other-workgroups)
|
||||
(defalias 'narf:switch-to-tab-left 'wg-switch-to-workgroup-left)
|
||||
(defalias 'narf:switch-to-tab-right 'wg-switch-to-workgroup-right)
|
||||
(defalias 'narf:switch-to-tab-last 'wg-switch-to-previous-workgroup))
|
||||
|
||||
(provide 'core-workgroups)
|
||||
;;; core-workgroups.el ends here
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
|
||||
(defun display-startup-echo-area-message ()
|
||||
(after! workgroups2
|
||||
(message "%sLoaded in %s" (narf/workgroup-display t t) (emacs-init-time))))
|
||||
(message "%sLoaded in %s" (narf/tab-display t) (emacs-init-time))))
|
||||
|
||||
(require 'server)
|
||||
(unless (server-running-p)
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
"<f9>" 'what-face
|
||||
|
||||
"M-b" 'narf:build
|
||||
"M-t" 'narf:workgroup-new
|
||||
"M-T" 'narf/workgroup-display
|
||||
"M-t" 'narf:tab-create
|
||||
"M-T" 'narf/tab-display
|
||||
"A-`" 'os-switch-to-term
|
||||
"C-`" 'narf/popup-messages
|
||||
"C-~" 'rtog/toggle-repl
|
||||
"M-`" 'narf/popup-toggle
|
||||
|
||||
"M-w" 'narf/close-window-or-workgroup
|
||||
"M-w" 'narf/close-window-or-tab
|
||||
"M-W" 'delete-frame
|
||||
"M-n" 'narf/new-buffer
|
||||
"M-N" 'narf/new-frame
|
||||
|
@ -57,15 +57,15 @@
|
|||
:n "M-o" 'narf/ido-find-file
|
||||
:n "M-O" 'narf/ido-find-project-file
|
||||
|
||||
:m "M-1" (λ! (narf:switch-to-workgroup-at-index 0))
|
||||
:m "M-2" (λ! (narf:switch-to-workgroup-at-index 1))
|
||||
:m "M-3" (λ! (narf:switch-to-workgroup-at-index 2))
|
||||
:m "M-4" (λ! (narf:switch-to-workgroup-at-index 3))
|
||||
:m "M-5" (λ! (narf:switch-to-workgroup-at-index 4))
|
||||
:m "M-6" (λ! (narf:switch-to-workgroup-at-index 5))
|
||||
:m "M-7" (λ! (narf:switch-to-workgroup-at-index 6))
|
||||
:m "M-8" (λ! (narf:switch-to-workgroup-at-index 7))
|
||||
:m "M-9" (λ! (narf:switch-to-workgroup-at-index 8))
|
||||
:m "M-1" (λ! (narf:switch-to-tab 0))
|
||||
:m "M-2" (λ! (narf:switch-to-tab 1))
|
||||
:m "M-3" (λ! (narf:switch-to-tab 2))
|
||||
:m "M-4" (λ! (narf:switch-to-tab 3))
|
||||
:m "M-5" (λ! (narf:switch-to-tab 4))
|
||||
:m "M-6" (λ! (narf:switch-to-tab 5))
|
||||
:m "M-7" (λ! (narf:switch-to-tab 6))
|
||||
:m "M-8" (λ! (narf:switch-to-tab 7))
|
||||
:m "M-9" (λ! (narf:switch-to-tab 8))
|
||||
|
||||
(:when IS-MAC
|
||||
"<A-left>" 'backward-word
|
||||
|
@ -127,8 +127,8 @@
|
|||
:n "r" 'narf/vcs-revert-hunk)
|
||||
|
||||
:n "b" 'helm-bookmarks
|
||||
:n "w" 'narf/workgroup-display
|
||||
:n "W" 'narf:helm-wg
|
||||
:n "w" 'narf/tab-display
|
||||
:n "W" 'narf/helm-tabs
|
||||
|
||||
:n "n" 'narf/neotree
|
||||
:nv "l" 'narf/nlinum-toggle
|
||||
|
@ -204,11 +204,11 @@
|
|||
:m "[d" 'narf/vcs-prev-hunk
|
||||
:m "]e" 'narf/flycheck-next-error
|
||||
:m "[e" 'narf/flycheck-previous-error
|
||||
;; Switch workgroups
|
||||
:n "]w" 'narf:switch-to-workgroup-right
|
||||
:n "[w" 'narf:switch-to-workgroup-left
|
||||
:m "gt" 'narf:switch-to-workgroup-right
|
||||
:m "gT" 'narf:switch-to-workgroup-left
|
||||
;; Switch tabs
|
||||
:n "]w" 'narf:switch-to-tab-right
|
||||
:n "[w" 'narf:switch-to-tab-left
|
||||
:m "gt" 'narf:switch-to-tab-right
|
||||
:m "gT" 'narf:switch-to-tab-left
|
||||
|
||||
;; Increment/decrement number under cursor
|
||||
:n "g=" 'evil-numbers/inc-at-pt
|
||||
|
|
|
@ -70,19 +70,16 @@
|
|||
(after! flycheck
|
||||
(exmap "er[rors]" (λ! (flycheck-buffer) (flycheck-list-errors))))
|
||||
|
||||
(after! workgroups2
|
||||
(exmap "sl[oad]" 'narf:load-session)
|
||||
(exmap "ss[ave]" 'narf:save-session)
|
||||
(exmap "wg" 'narf/workgroup-display)
|
||||
(exmap "tab" 'narf/workgroup-display)
|
||||
(exmap "tabn[ew]" 'narf:workgroup-new)
|
||||
(exmap "tabr[ename]" 'narf:workgroup-rename)
|
||||
(exmap "tabn[ext]" 'wg-switch-to-workgroup-right)
|
||||
(exmap "tabp[rev]" 'wg-switch-to-workgroup-left)
|
||||
(exmap "tabl[ast]" 'wg-switch-to-previous-workgroup)
|
||||
(exmap "tabq[uit]" 'narf:workgroup-delete)
|
||||
(exmap "k[ill]w" 'wg-kill-workgroup)
|
||||
(exmap "k[ill]ow" 'narf:kill-other-workgroups))
|
||||
(exmap "tabs" 'narf/tab-display)
|
||||
(exmap "tabn[ew]" 'narf:tab-create)
|
||||
(exmap "tabr[ename]" 'narf:tab-rename)
|
||||
(exmap "tabc[lose]" 'narf:kill-tab)
|
||||
(exmap "tabc[lose]o" 'narf:kill-other-tabs)
|
||||
(exmap "tabn[ext]" 'narf:switch-to-tab-right)
|
||||
(exmap "tabp[rev]" 'narf:switch-to-tab-left)
|
||||
(exmap "tabl[ast]" 'narf:switch-to-tab-last)
|
||||
|
||||
(provide 'my-commands)
|
||||
;;; my-commands.el ends here
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue