Skip to content

44/strata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

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

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

Keybindings

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

Examples

" 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 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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages