mirror of
https://github.com/FliegendeWurst/tmux-thumbs.git
synced 2024-11-09 16:00:35 +00:00
More doc
This commit is contained in:
parent
1712d40afe
commit
f94d81bdd2
59
README.md
59
README.md
@ -4,9 +4,13 @@
|
|||||||
|
|
||||||
A lightning fast version of [tmux-fingers](https://github.com/Morantron/tmux-fingers) written in [Rust](https://www.rust-lang.org/) for copy pasting with vimium/vimperator like hints.
|
A lightning fast version of [tmux-fingers](https://github.com/Morantron/tmux-fingers) written in [Rust](https://www.rust-lang.org/) for copy pasting with vimium/vimperator like hints.
|
||||||
|
|
||||||
:warning: This plugin is active development.
|
## Usage
|
||||||
|
|
||||||
## Matched patterns
|
Press ( <kbd>prefix</kbd> + <kbd>Space</kbd> ) to highlist in you current tmux
|
||||||
|
visible pane all text that match specific pattern. The press the highlighted
|
||||||
|
letter hint to yank the text in your tmux buffer.
|
||||||
|
|
||||||
|
### Matched patterns
|
||||||
|
|
||||||
- File paths
|
- File paths
|
||||||
- File in diff
|
- File in diff
|
||||||
@ -18,6 +22,34 @@ A lightning fast version of [tmux-fingers](https://github.com/Morantron/tmux-fin
|
|||||||
- kubernetes resources
|
- kubernetes resources
|
||||||
- UUIDs
|
- UUIDs
|
||||||
|
|
||||||
|
Those are the list of mattched patterns that will be highlighted by default. If
|
||||||
|
you want to highlight a pattern that is not in this list you can add one or
|
||||||
|
more with `--regexp` parameter.
|
||||||
|
|
||||||
|
## Demo
|
||||||
|
|
||||||
|
[![demo](https://asciinema.org/a/232775.png)](https://asciinema.org/a/232775?autoplay=1)
|
||||||
|
|
||||||
|
## Tmux integration
|
||||||
|
|
||||||
|
Clone the repo:
|
||||||
|
|
||||||
|
```
|
||||||
|
git clone https://github.com/fcsonline/tmux-thumbs ~/.tmux/plugins/tmux-thumbs
|
||||||
|
```
|
||||||
|
|
||||||
|
Source it in your `.tmux.conf`:
|
||||||
|
|
||||||
|
```
|
||||||
|
run-shell ~/.tmux/plugins/tmux-thumbs/tmux-thumbs.tmux
|
||||||
|
```
|
||||||
|
|
||||||
|
Reload TMUX conf by running:
|
||||||
|
|
||||||
|
```
|
||||||
|
tmux source-file ~/.tmux.conf
|
||||||
|
```
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
The easiest way right now is to install with [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html):
|
The easiest way right now is to install with [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html):
|
||||||
@ -34,13 +66,15 @@ git clone git@github.com:fcsonline/tmux-thumbs.git && cd tmux-thumbs
|
|||||||
cargo build --release
|
cargo build --release
|
||||||
```
|
```
|
||||||
|
|
||||||
## Demo
|
|
||||||
|
|
||||||
[![demo](https://asciinema.org/a/232775.png)](https://asciinema.org/a/232775?autoplay=1)
|
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
All `tmux-thumbs` configuration works settings custom paramenters to `tmux-thumbs` command.
|
If you want to customize how is shown your tmux-thumbs hints you can run the
|
||||||
|
command `tmux-thumbs` directly and play with all available parameters to set
|
||||||
|
your perfect profile.
|
||||||
|
|
||||||
|
Once completed, write those parameters in
|
||||||
|
`~/.tmux/plugins/tmux-thumbs/tmux-thumbs.sh` file. There is a `COMMAND`
|
||||||
|
variable where you can set all those options.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
@ -95,7 +129,7 @@ OPTIONS:
|
|||||||
- **hint-fg-color:** Sets the foregroud color for hints [default: yellow]
|
- **hint-fg-color:** Sets the foregroud color for hints [default: yellow]
|
||||||
- **select-fg-color:** Sets the foregroud color for selection [default: blue]
|
- **select-fg-color:** Sets the foregroud color for selection [default: blue]
|
||||||
|
|
||||||
## Alphabets
|
#### Alphabets
|
||||||
|
|
||||||
This is the list of available alphabets:
|
This is the list of available alphabets:
|
||||||
|
|
||||||
@ -122,7 +156,7 @@ This is the list of available alphabets:
|
|||||||
- `colemak-left-hand`: arstqwfpzxcv
|
- `colemak-left-hand`: arstqwfpzxcv
|
||||||
- `colemak-right-hand`: neioluymjhk
|
- `colemak-right-hand`: neioluymjhk
|
||||||
|
|
||||||
## Colors
|
#### Colors
|
||||||
|
|
||||||
This is the list of available colors:
|
This is the list of available colors:
|
||||||
|
|
||||||
@ -141,6 +175,13 @@ This is the list of available colors:
|
|||||||
- **Arrow navigation:** You can use the arrows to move arround between all matched items.
|
- **Arrow navigation:** You can use the arrows to move arround between all matched items.
|
||||||
- **Auto paste:** If your last typed hint character is uppercase, you are going to pick and paste the desired hint.
|
- **Auto paste:** If your last typed hint character is uppercase, you are going to pick and paste the desired hint.
|
||||||
|
|
||||||
|
|
||||||
|
## Contribute
|
||||||
|
|
||||||
|
This project started as a side project to learn Rust, so I'm sure that is full
|
||||||
|
of mistakes and areas to be improve. If you think you can tweak the code to
|
||||||
|
make it better, I'll really appreaciate a pull request. ;)
|
||||||
|
|
||||||
# License
|
# License
|
||||||
|
|
||||||
[MIT](https://github.com/fcsonline/tmux-thumbs/blob/master/LICENSE)
|
[MIT](https://github.com/fcsonline/tmux-thumbs/blob/master/LICENSE)
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
source ~/.bash_profile
|
source ~/.bash_profile
|
||||||
|
|
||||||
|
COMMAND="tmux-thumbs -a qwerty -r -u"
|
||||||
|
|
||||||
CURRENT_PANE_ID=$(tmux list-panes -F "#{pane_id}:#{?pane_active,active,nope}" | grep active | cut -d: -f1)
|
CURRENT_PANE_ID=$(tmux list-panes -F "#{pane_id}:#{?pane_active,active,nope}" | grep active | cut -d: -f1)
|
||||||
COMMAND="tmux-thumbs -a qwerty -r -u --tmux-pane ${CURRENT_PANE_ID}"
|
NEW_ID=$(tmux new-window -P -d -n "[thumbs]" ${COMMAND} --tmux-pane ${CURRENT_PANE_ID})
|
||||||
NEW_ID=$(tmux new-window -P -d -n "[thumbs]" ${COMMAND})
|
|
||||||
NEW_PANE_ID=$(tmux list-panes -a | grep ${NEW_ID} | grep --color=never -o '%[0-9]\+')
|
NEW_PANE_ID=$(tmux list-panes -a | grep ${NEW_ID} | grep --color=never -o '%[0-9]\+')
|
||||||
|
|
||||||
tmux swap-pane -d -s ${CURRENT_PANE_ID} -t ${NEW_PANE_ID}
|
tmux swap-pane -d -s ${CURRENT_PANE_ID} -t ${NEW_PANE_ID}
|
||||||
|
Loading…
Reference in New Issue
Block a user