spacebar

Workspaces Bar


Keywords
convenience
License
GPL-3.0

Documentation

Spacebar

Spacebar provides workspaces with an interface similar to vim tabs. Workspaces can display any buffer, but retain their own split layout. Spacebar is a user interface built on eyebrowse, which manages the workspaces.

./spacebar.gif

Installation

Emacs-style keybindings

Emacs keybindings are provided in the spacebar-command-map keymap. Bind this keymap to a prefix of your choice:

(use-package spacebar
  :bind-keymap ("C-c w" . spacebar-command-map)
  :config
  (spacebar-mode))
Key Action
C-c C-w c Prompt for a space name and create it or switch to it
C-c C-w ” Close the current space
C-c C-w ’ Switch to the most recent space
C-c C-w 1 Switch to space 1
C-c C-w 2 Switch to space 2
C-c C-w 3 Switch to space 3
C-c C-w 4 Switch to space 4
C-c C-w 5 Switch to space 5
C-c C-w 6 Switch to space 6
C-c C-w 7 Switch to space 7
C-c C-w 8 Switch to space 8
C-c C-w 9 Switch to space 9
C-c C-w 0 Switch to space 0
C-c C-w < Switch to the space to the left
C-c C-w > Switch to the space to the right
C-c C-w , Rename the current space

Vim-style keybindings

Call (spacebar-setup-evil-keys) to initialize the default evil-mode bindings:

(use-package spacebar
  :after evil
  :config
  (spacebar-mode)
  (spacebar-setup-evil-keys))
Key Action
gt, :tabn[ext] Switch to the space to the right
gT, :tabp[revious], :tabN[ext] Switch to the space to the left
g` Switch to the most recent space
{count}gt Switch to space {count}i
:tabr[ewind], :tabf[irst[ Switch to the first space
:tabl[ast] Switch to the last space
:tabnew Prompt for a space name and create it or switch to it
:tabc[lose] Close the current space

Integration with other packages

Projectile

To create (or switch to) spaces when switching between projects with projectile, call (spacebar-projectile-init):

(use-package spacebar
  :after projectile
  :config
  (spacebar-mode)
  (spacebar-projectile-init))

Deft

To create a dedicated workspace for deft notes, bind a key to spacebar-deft,

(use-package spacebar
  :after deft
  :bind ("<f8>" . #'spacebar-deft)
  :config
  (spacebar-mode))