8000 GitHub - nwtnni/tmux-copy: Another hint-based copying plugin for tmux
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nwtnni/tmux-copy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tmux-copy

A highly opinionated copying plugin inspired by several predecessors:

Written primarily for personal use. Relies on copypasta-ext for system clipboard support. Currently only used on Linux/Wayland, but in theory it should work on other operating systems.

Installation

Requires Rust to compile the binaries, and tpm to manage the tmux installation.

  • Add set -g @plugin 'nwtnni/tmux-copy' to your .tmux.conf
  • Install with <PREFIX>-I
  • Navigate to your plugin directory (typically ~/.tmux/plugins)
  • Run cargo build --release to compile

Known Issues

  • Not very configurable
  • Requires Rust compiler to build binaries from source
  • Allows overlapping matches

"Configuration"

  • Regular expressions defined in find
  • M 5A6A atching colors defined in main
  • Hint strings defined in hint
  • Key binding (<PREFIX>-f) defined in tmux-copy.tmux

Performance

  • Uses regex as the underlying search engine
  • Scans each line once with a RegexSet to determine if any specific regular expression matches. Scans again for each regular expression that matches at least once in the line. Assuming matches are sparse, we'll only scan each line a single time independently of how many specific regular expressions there are.
  • Generates hint strings at compile time using a fun macro
  • Minimizes calls to tmux

About

Another hint-based copying plugin for tmux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0