Skip to content

paxunix/bin-comm.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

bin-comm.nvim

Neovim plugin that adds a :Comm command for comparing the contents of two diff buffers using /bin/comm. It's useful to see what lines exist only in the first file, both files, and second file.

Installation

With lazy.nvim:

{
  "paxunix/bin-comm.nvim",
  cmd = "Comm",
}

Using cmd = "Comm" tells lazy.nvim to load the plugin only when the :Comm command is invoked.

Usage

Open exactly two buffers in diff mode, then run:

:Comm

The command opens three result buffers:

  • ONLY-<left>
  • BOTH-<left>+<right>
  • ONLY-<right>

Input is normalized before comparison:

  • leading and trailing whitespace is trimmed
  • internal whitespace runs are collapsed to a single space
  • duplicate lines are removed

If diffopt includes icase, comparisons are case-insensitive.

About

Neovim plugin that adds a `:Comm` command for comparing the contents of two diff buffers using /bin/comm. It's useful to see what lines exist only in the first file, both files, and second file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages