2016-05-01 19:50:41 +02:00
|
|
|
# tmux-fingers
|
|
|
|
|
|
|
|
**tmux-fingers**: copy pasting with vimium/vimperator like hints.
|
|
|
|
|
|
|
|
# Usage
|
|
|
|
|
|
|
|
When called ( `prefix + F` ), it will highlight relevant stuff in the current
|
|
|
|
pane along with letter hints. By pressing those letters, the highlighted match
|
|
|
|
will be yanked. Less keystrokes == profit!
|
|
|
|
|
|
|
|
Relevant stuff:
|
|
|
|
|
|
|
|
* File paths
|
|
|
|
* git SHAs
|
2016-05-01 19:54:20 +02:00
|
|
|
* numbers ( 4+ digits )
|
|
|
|
* urls
|
|
|
|
* ip addresses
|
2016-05-01 19:50:41 +02:00
|
|
|
|
|
|
|
It also works on copy mode, but requires *tmux 2.2* or newer to properly take
|
|
|
|
the scroll position into account.
|
|
|
|
|
2016-05-02 23:00:28 +02:00
|
|
|
# Requirements
|
|
|
|
|
|
|
|
* bash 4+
|
|
|
|
* tmux 2.1+ ( 2.2 recommended )
|
|
|
|
|
2016-05-01 19:50:41 +02:00
|
|
|
# Installation
|
|
|
|
|
|
|
|
## Using [Tmux Plugin Manager](https://github.com/tmux-plugins/tpm)
|
|
|
|
|
|
|
|
Add the following to your list of TPM plugins in `.tmux.conf`:
|
|
|
|
|
|
|
|
```
|
|
|
|
set -g @plugin 'Morantron/tmux-fingers'
|
|
|
|
```
|
|
|
|
|
|
|
|
Hit `prefix + I` to fetch and source the plugin. You should now be able to use
|
|
|
|
the plugin!
|
|
|
|
|
|
|
|
## Manual
|
|
|
|
|
|
|
|
Clone the repo:
|
|
|
|
|
|
|
|
```
|
|
|
|
➜ git clone https://github.com/Morantron/tmux-fingers ~/clone/path
|
|
|
|
```
|
|
|
|
|
|
|
|
Source it in your `.tmux.conf`:
|
|
|
|
|
|
|
|
```
|
|
|
|
run-shell ~/clone/path/tmux-fingers.tmux
|
|
|
|
```
|
|
|
|
|
|
|
|
Reload TMUX conf by running:
|
|
|
|
|
|
|
|
```
|
2016-05-01 19:57:07 +02:00
|
|
|
➜ tmux source-file ~/.tmux.conf
|
2016-05-01 19:50:41 +02:00
|
|
|
```
|
|
|
|
|
2016-05-01 19:57:07 +02:00
|
|
|
# Configuration
|
2016-05-01 19:50:41 +02:00
|
|
|
|
|
|
|
You can change the key that invokes **tmux-fingers**:
|
|
|
|
|
|
|
|
```
|
|
|
|
# F is the default, but you can set another one
|
|
|
|
set -g @fingers-key F
|
|
|
|
```
|
|
|
|
|
|
|
|
You can also add additional patterns if you want more stuff to be highlighted:
|
|
|
|
|
|
|
|
```
|
|
|
|
set -g @fingers-pattern-0 'git rebase --(abort|continue)'
|
|
|
|
set -g @fingers-pattern-1 'yolo'
|
|
|
|
.
|
|
|
|
.
|
|
|
|
.
|
2016-05-01 19:54:20 +02:00
|
|
|
set -g @fingers-pattern-50 'whatever'
|
2016-05-01 19:50:41 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
NOTE: patterns are case insensitive, and grep's extended syntax should be used.
|
|
|
|
`man grep` for more info.
|
|
|
|
|
|
|
|
If the introduced regexp contains an error, an error will be shown when
|
|
|
|
invoking the plugin.
|
|
|
|
|
|
|
|
# Acknowledgements and inspiration
|
|
|
|
|
|
|
|
This plugin is heavily inspired by
|
|
|
|
[tmux-copycat](https://github.com/tmux-plugins/tmux-copycat) ( **tmux-fingers**
|
|
|
|
predefined search are *copycatted* :trollface: from
|
|
|
|
[tmux-copycat](https://github.com/tmux-plugins/tmux-copycat) ).
|
|
|
|
|
|
|
|
Kudos to [bruno-](https://github.com/bruno-) for paving the way to tmux
|
|
|
|
plugins! :clap: :clap:
|
|
|
|
|
|
|
|
# License
|
|
|
|
|
2016-05-01 19:57:07 +02:00
|
|
|
[MIT](https://github.com/Morantron/tmux-fingers/blob/master/LICENSE)
|