Skip to content

Layoutsλ︎

Layouts are used to manage projects separately. Each layout keeps its own list of open buffers, making it quick to navigate to specific buffers.

Space l opens the layout menu

Space l l to list all layouts, typing to narrow down to a match. Enter to open the layout. Type a new layer name to create a new layer.

Space l s to save the layouts to file (layouts should be saved automatically when restarting of exiting Emacs).

Space l Tab switches to the previous layout, providing a quick way to jump between two projects.

Limit Space Tab to current layout

Set the spacemacs-layouts-restrict-spc-tab variable to true to limit Space Tab to toggle between the last current and last buffer from the current layout. The spacemacs-layouts layer is automatically included in Spacemacs, however, to specify variables it must be added to the dotspacemacs-configuration-layers in the Spacemacs configuration file

dotspacemacs-configuration-layers
(spacemacs-layouts :variables spacemacs-layouts-restrict-spc-tab t)  ; (1)!
1. practicalli/spacemacs.d contains this configuration

Layer Indicatorλ︎

The layer name shows in the mode line.

Spacemacs - Layouts - practicalli spacemacs layout Spacemacs - Layouts - practicalli spacemacs layout

Layouts Transient Stateλ︎

Space l ? opens the layouts transient state to manage layouts with a single character keybinding. The transient state also lists all the current layouts.

Spacemacs Layers - practicalli example layer list Spacemacs Layers - practicalli example layer list

The most layouts common commands are:

Keybindings Action
Space l l Create a new layout or switch to existing layout by typing its name
Space l d Delete current layout
Space Tab 0..9 Select layout in position (creates layouts if none exists)
Space l Tab Select previously displayed layout
Space l n / N Next / Previous layout
Space l < / > Move layout left or right in the layout list

Referenceλ︎

Layouts - Spacemacs documentation