Skip to content

Detects newline in your clipboard from tmux session

Notifications You must be signed in to change notification settings

alayamanas/tmux-newline-detector

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

tmux newline detector

This tpm plugin detects newline in tmux buffer (or clipboard if you use reattach-to-user-namespace), and asks for you whether or not pasting it to terminal with kindness. Also, add peek key binding to show what is in tmux buffer.

What is kindess? If your buffer is only one sentence and includes newline, this plugin removes the newline! But nothing to do if several sentences buffered in tmux.

Requirements

  1. tmux
  2. tpm
  3. reattach-to-user-namespace (optional)

Install

Add the following lines to your ~/.tmux.conf

set-option -g @plugin knakayama/tmux-newline-detector

then, press Prefix + I in tmux session.

Usage

Default peek key binding is Prefix + P. If you change this key binding, set the following line to your ~/.tmux.conf.

set-option -g @peek 'x' # or your favorite key binding

Default paste key binding is Prefix + ]. If you change this key binding, set the following line to your ~/.tmux.conf.

set-option -g @paste 'X' # or your favorite key binding

License

MIT

Author

knakayama

About

Detects newline in your clipboard from tmux session

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%