Skip to content

Latest commit

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

strata.nvim

Edit multiple files in a single buffer.

Overview

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.

Usage

Commands

CommandDescription
:Strata files <file1> <file2> ...Open multiple files
:Strata grep <pattern> [files...]Open files with matching lines
:Strata qf or :Strata quickfixOpen files from quickfix list

Keybindings

In strata buffers, the following keybindings are available:

KeybindingDescription
[fGo to previous section
]fGo to next section
zoExpand context (show more lines around current section)
zcShrink 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

Examples

" Open multiple files in one buffer
:Strata filestodo.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 switch

Or in Lua:

require("strata").open_files({"todo.md", "someday.md", "done.md"})

How it works

  • Each file with matches appears as one continuous section
  • Section spans from first_match - 3 to last_match + 3 lines (context lines)
  • Edit the matches and surrounding context, then :w to save changes back to original files
  • Non-matching lines outside the section remain untouched

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages