Skip to content

Latest commit

 

History

History
60 lines (46 loc) · 3.91 KB

keys_window_management.org

File metadata and controls

60 lines (46 loc) · 3.91 KB

How to Create and Manage Multiple Windows

  • A “window” is a region within an Emacs frame that shows a particular buffer
  • A “frame” is an Emacs program window at the level of your OS or desktop environment which can hold multiple windows
  • Multiple windows can show the same buffer, but with different scroll, selection, etc

Basic Window Operations

CommandKeyDescription
delete-windowC-x 0Close the current window
delete-other-windowsC-x 1Close all other windows
split-window-belowC-x 2Split the current window horizonally
split-window-rightC-x 3Split the current window vertically
shrink-window-horizontallyC-x {Make the window smaller horizontally
enlarge-window-horizontallyC-x }Make the window bigger horizontally
shrink-window-if-larger-than-bufferC-x -Shrink the window vertically to buffer
balance-windowsC-x +Balance the sizes of all windows

TIP: The universal-argument (C-u) and a numeric prefix can be used to dictate the mount by which the window is resized.

evil-mode alternatives

CommandKeyDescription
evil-window-deleteC-w C-cClose the current window
delete-other-windowsC-w C-oClose all other windows
evil-window-splitC-w C-sSplit the current window horizontally
evil-window-vsplitC-w C-vSplit the current window vertically
evil-window-set-widthC-w (pipe)Use numeric prefix to set window width
evil-window-set-heightC-w _Use numeric prefix to set window height
balance-windowsC-w =Balance the sizes of all windows

TIP: A numeric argument before running evil-window-set-width and evil-window-set-height to specify the desired size of the window.

“Other window” operations

CommandKeysDescription
other-windowC-x oSelect the next visible window
find-file-other-windowC-x 4 fOpen a file in another window
dired-other-windowC-x 4 dOpen Dired in another window
dired-jump-other-windowC-x 4 jOpen Dired in another window at location of file
scroll-other-windowM-pgdnScroll the other window down without focusing it
scroll-other-window-downM-pgupScroll the other window up without focusing it

evil-mode alternatives

CommandKeysDescription
evil-window-nextC-w C-wSelect the next visible window
evil-window-prevC-w WSelect the previous visible window
ffap-other-windowC-w C-fOpen a file in another window