Multibuffers
A multibuffer is one editor view made of excerpts from several files. You edit it like any other file, and your changes are applied to the real files. Combined with multiple cursors, it makes wide changes fast.
Where multibuffers appear
- Project search (
cmd-shift-f): one excerpt per match. - Find all references (
alt-shift-f12), and go to definition when a symbol has several definitions. - Diagnostics (
cmd-shift-m): every error and warning in the project. - Git: the project diff shows each changed file as an excerpt. See Git.
- Select all matches in a new view:
alt-enterin the editor opens the current selections in a multibuffer.
Edit in place
Edit text in an excerpt as you would in a file. Changes appear in any open copy of that file. Save everything at once with cmd-s.
To change many places at once:
- Select one match with the mouse or
cmd-d. - Press
cmd-dagain to add the next match, orcmd-shift-lto select every match. - Type. Every excerpt changes together.
Jump to the source file
Click a divider line between excerpts, or put the cursor in an excerpt and press alt-enter (Open Excerpts). With several cursors, each file opens at its cursor. cmd-alt-enter opens the file in a split.
To open an excerpt on double-click, set:
{ "double_click_in_multibuffer": "open" }The default is "select".
Excerpt context
Each excerpt shows a few lines around the match. Change this with excerpt_context_lines (default 2). shift-enter expands an excerpt, by expand_excerpt_lines lines (default 5).
Navigate
cmd-upandcmd-downjump to the start of the current or next excerpt.- The outline panel lists files and matches in the active multibuffer. Set
outline_panel.multi_buffer_hide_symbolstotrueto show only files and folders.