NOTE: tmux 3.1 adds support for native regex searches. This is great news because it means a big part of 'tmux-copycat' is now available natively! Use this plugin only if you need its other features.
This plugin enables:
Predefined searches are plugin killer feature. It speeds the workflow and reduces mouse usage with Tmux.
It works even better when paired with tmux yank. Tested and working on Linux, OSX and Cygwin.
prefix + / - regex search (strings work too)Example search entries:
foo - searches for string foo[0-9]+ - regex search for numbersGrep is used for searching.
Searches are case insensitive.
prefix + ctrl-f - simple file searchprefix + ctrl-g - jumping over git status files (best used after git status command)prefix + alt-h - jumping over SHA-1/SHA-256 hashes (best used after git log command)prefix + ctrl-u - url search (http, ftp and git urls)prefix + ctrl-d - number search (mnemonic d, as digit)prefix + alt-i - ip address searchThese start "copycat mode" and jump to first match.
These are enabled when you search with copycat:
n - jumps to the next matchN - jumps to the previous matchTo copy a highlighted match:
Enter - if you're using Tmux vi modectrl-w or alt-w - if you're using Tmux emacs modeCopying a highlighted match will take you "out" of copycat mode. Paste with
prefix + ] (this is Tmux default paste).
Copying highlighted matches can be enhanced with tmux yank.
Add plugin to the list of TPM plugins in .tmux.conf:
set -g @plugin 'tmux-plugins/tmux-copycat'
Hit prefix + I to fetch the plugin and source it. You should now be able to
use the plugin.
Optional (but recommended) install gawk via your package manager of choice
for better UTF-8 character support.
Clone the repo:
$ git clone https://github.com/tmux-plugins/tmux-copycat ~/clone/path
Add this line to the bottom of .tmux.conf:
run-shell ~/clone/path/copycat.tmux
Reload TMUX environment with: $ tmux source-file ~/.tmux.conf. You should now
be able to use the plugin.
Optional (but recommended) install gawk via your package manager of choice
for better UTF-8 character support.
Due to the changes in tmux, the latest version of this plugin doesn't support tmux 2.3 and earlier. It is recommended you upgrade to tmux version 2.4 or later. If you must continue using older version, please follow these steps for installation.
This plugin has some known limitations. Please read about it here.
.tmux.conf for
searches you use often, more info heretmux-copycat works great with:
This plugin has a pretty extensive integration test suite that runs on travis.
When run locally, it depends on vagrant. Run it with:
# within project top directory
$ ./run-tests
Bug fixes and contributions are welcome.
Feel free to suggest new features, via github issues.
If you have a bigger idea you'd like to work on, please get in touch, also via github issues.
1,890 followers · starred Aug 2014
341 followers · starred Jan 2019
327 followers · starred Feb 2015
79 followers · starred Aug 2017
NOTE: tmux 3.1 adds support for native regex searches. This is great news because it means a big part of 'tmux-copycat' is now available natively! Use this plugin only if you need its other features.
This plugin enables:
Predefined searches are plugin killer feature. It speeds the workflow and reduces mouse usage with Tmux.
It works even better when paired with tmux yank. Tested and working on Linux, OSX and Cygwin.
prefix + / - regex search (strings work too)Example search entries:
foo - searches for string foo[0-9]+ - regex search for numbersGrep is used for searching.
Searches are case insensitive.
prefix + ctrl-f - simple file searchprefix + ctrl-g - jumping over git status files (best used after git status command)prefix + alt-h - jumping over SHA-1/SHA-256 hashes (best used after git log command)prefix + ctrl-u - url search (http, ftp and git urls)prefix + ctrl-d - number search (mnemonic d, as digit)prefix + alt-i - ip address searchThese start "copycat mode" and jump to first match.
These are enabled when you search with copycat:
n - jumps to the next matchN - jumps to the previous matchTo copy a highlighted match:
Enter - if you're using Tmux vi modectrl-w or alt-w - if you're using Tmux emacs modeCopying a highlighted match will take you "out" of copycat mode. Paste with
prefix + ] (this is Tmux default paste).
Copying highlighted matches can be enhanced with tmux yank.
Add plugin to the list of TPM plugins in .tmux.conf:
set -g @plugin 'tmux-plugins/tmux-copycat'
Hit prefix + I to fetch the plugin and source it. You should now be able to
use the plugin.
Optional (but recommended) install gawk via your package manager of choice
for better UTF-8 character support.
Clone the repo:
$ git clone https://github.com/tmux-plugins/tmux-copycat ~/clone/path
Add this line to the bottom of .tmux.conf:
run-shell ~/clone/path/copycat.tmux
Reload TMUX environment with: $ tmux source-file ~/.tmux.conf. You should now
be able to use the plugin.
Optional (but recommended) install gawk via your package manager of choice
for better UTF-8 character support.
Due to the changes in tmux, the latest version of this plugin doesn't support tmux 2.3 and earlier. It is recommended you upgrade to tmux version 2.4 or later. If you must continue using older version, please follow these steps for installation.
This plugin has some known limitations. Please read about it here.
.tmux.conf for
searches you use often, more info heretmux-copycat works great with:
This plugin has a pretty extensive integration test suite that runs on travis.
When run locally, it depends on vagrant. Run it with:
# within project top directory
$ ./run-tests
Bug fixes and contributions are welcome.
Feel free to suggest new features, via github issues.
If you have a bigger idea you'd like to work on, please get in touch, also via github issues.
1,890 followers · starred Aug 2014
341 followers · starred Jan 2019
327 followers · starred Feb 2015
79 followers · starred Aug 2017