Skip to content

Commit

Permalink
Add binding to spacemacs/goto-buffer-workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBB committed Feb 25, 2016
1 parent ecaeb8d commit e061b13
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 21 deletions.
41 changes: 21 additions & 20 deletions layers/+window-management/eyebrowse/README.org
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,24 @@ Set the variable =eyebrowse-display-help= to =nil=

* Key bindings

| Key Binding | Description |
|-------------------------------------------+------------------------------------|
| ~gt~ | go to next workspace |
| ~gT~ | got to previous workspace |
| ~SPC l w 1~ | create or switch to workspace 1 |
| ~SPC l w 2~ | create or switch to workspace 2 |
| ~SPC l w 3~ | create or switch to workspace 3 |
| ~SPC l w 4~ | create or switch to workspace 4 |
| ~SPC l w 5~ | create or switch to workspace 5 |
| ~SPC l w 6~ | create or switch to workspace 6 |
| ~SPC l w 7~ | create or switch to workspace 7 |
| ~SPC l w 8~ | create or switch to workspace 8 |
| ~SPC l w 9~ | create or switch to workspace 9 |
| ~SPC l w 0~ | create or switch to workspace 0 |
| ~SPC l w TAB~ | switch to last active workspace |
| ~SPC l w c~ | close current workspace |
| ~SPC l w n~ or ~SPC l w l~ | switch to next workspace |
| ~SPC l w N~ or ~SPC l w p~ or ~SPC l w h~ | switch to previous workspace |
| ~SPC l w r~ | set a tag to the current workspace |
| ~SPC l w w~ | switched to tagged workspace |
| Key Binding | Description |
|-------------------------------------------+--------------------------------------|
| ~gt~ | go to next workspace |
| ~gT~ | got to previous workspace |
| ~SPC b W~ | go to workspace and window by buffer |
| ~SPC l w 1~ | create or switch to workspace 1 |
| ~SPC l w 2~ | create or switch to workspace 2 |
| ~SPC l w 3~ | create or switch to workspace 3 |
| ~SPC l w 4~ | create or switch to workspace 4 |
| ~SPC l w 5~ | create or switch to workspace 5 |
| ~SPC l w 6~ | create or switch to workspace 6 |
| ~SPC l w 7~ | create or switch to workspace 7 |
| ~SPC l w 8~ | create or switch to workspace 8 |
| ~SPC l w 9~ | create or switch to workspace 9 |
| ~SPC l w 0~ | create or switch to workspace 0 |
| ~SPC l w TAB~ | switch to last active workspace |
| ~SPC l w c~ | close current workspace |
| ~SPC l w n~ or ~SPC l w l~ | switch to next workspace |
| ~SPC l w N~ or ~SPC l w p~ or ~SPC l w h~ | switch to previous workspace |
| ~SPC l w r~ | set a tag to the current workspace |
| ~SPC l w w~ | switched to tagged workspace |
4 changes: 3 additions & 1 deletion layers/+window-management/eyebrowse/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
(define-key evil-motion-state-map "gt" 'eyebrowse-next-window-config)
(define-key evil-motion-state-map "gT" 'eyebrowse-prev-window-config)

(spacemacs/set-leader-keys "bW" 'spacemacs/goto-buffer-workspace)

(defun spacemacs/find-workspace (buffer)
"Find Eyebrowse workspace containing BUFFER.
If several workspaces contain BUFFER, return the first one. Workspaces are
Expand All @@ -31,7 +33,7 @@ If no workspace contains
BUFFER, return nil."
;; the second element of a workspace is its window-state object
(--find (memq buffer (spacemacs/window-state-get-buffers (cadr it)))
(eyebrowse--get 'window-configs)))
(eyebrowse--get 'window-configs)))

(defun spacemacs/display-in-workspace (buffer alist)
"Display BUFFER's workspace.
Expand Down

0 comments on commit e061b13

Please sign in to comment.