Edit multiple files in a single buffer.
strata.nvim is a Neovim plugin that allows you to open and edit multiple files simultaneously in one unified buffer. Each file's content is displayed with visual separators, and changes are automatically saved back to their respective files. This is project for my personal use, use on your own risk.
| Command | Description |
|---|---|
:Strata files <file1> <file2> ... |
Open multiple files |
:Strata grep <pattern> [files...] |
Open files with matching lines |
:Strata qf or :Strata quickfix |
Open files from quickfix list |
In strata buffers, the following keybindings are available:
| Keybinding | Description |
|---|---|
[f |
Go to previous section |
]f |
Go to next section |
zo |
Expand context (show more lines around current section) |
zc |
Shrink context (show fewer lines around current section) |
The expand/shrink commands work directionally based on cursor position:
- If cursor is in the first half of a section, lines are added/removed from the beginning
- If cursor is in the second half, lines are added/removed from the end
" Open multiple files in one buffer
:Strata files todo.md someday.md done.md
" Find and edit matching lines
:Strata grep "TODO" *.md
:Strata grep "function" lua/*.lua
" Edit quickfix results
:grep "pattern" .
:Strata qf
" Switch to existing strata buffer
:Strata switchOr in Lua:
require("strata").open_files({"todo.md", "someday.md", "done.md"})- Each file with matches appears as one continuous section
- Section spans from
first_match - 3tolast_match + 3lines (context lines) - Edit the matches and surrounding context, then
:wto save changes back to original files - Non-matching lines outside the section remain untouched