Skip to content

Commit

Permalink
Add readme background
Browse files Browse the repository at this point in the history
  • Loading branch information
fcsonline committed Mar 10, 2019
1 parent 2ebdcbc commit 4c42803
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A lightning fast version of [tmux-fingers](https://github.com/Morantron/tmux-fin
## Usage

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
visible pane all text that match specific pattern. Then press the highlighted
letter hint to yank the text in your tmux buffer.

### Matched patterns
Expand All @@ -22,7 +22,7 @@ letter hint to yank the text in your tmux buffer.
- kubernetes resources
- UUIDs

Those are the list of mattched patterns that will be highlighted by default. If
These 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.

Expand All @@ -38,39 +38,30 @@ 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:
Compile it with [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html):

```
tmux source-file ~/.tmux.conf
cd ~/.tmux/plugins/tmux-thumbs
cargo build --release
```

## Install

The easiest way right now is to install with [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html):
Source it in your `.tmux.conf`:

```
cargo install tmux-thumbs
tmux-thumbs -
run-shell ~/.tmux/plugins/tmux-thumbs/tmux-thumbs.tmux
```

or download the source code and compile it:
Reload TMUX conf by running:

```
git clone [email protected]:fcsonline/tmux-thumbs.git && cd tmux-thumbs
cargo build --release
tmux source-file ~/.tmux.conf
```

## Configuration

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.
command `target/release/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`
Expand All @@ -79,7 +70,7 @@ variable where you can set all those options.
Example:

```
tmux-thumbs -a qwerty -r -u
./target/release/tmux-thumbs -a qwerty -r -u
```

You can review all available options executing:
Expand Down Expand Up @@ -113,6 +104,11 @@ OPTIONS:
```

## Extra features

- **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.

### Arguments

- **alphabet:** Choose which set of characters is used to build hints. Default [qwerty]
Expand Down Expand Up @@ -170,11 +166,15 @@ This is the list of available colors:
- white
- default

## Extra features
## Background

- **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.
As I said, this project is based in [tmux-fingers](https://github.com/Morantron/tmux-fingers). He did an extraordinary job, building all necessary pieces in Bash to achieve the text picker behaviour. He only deserves my gratitude for all the time I have been using [tmux-fingers](https://github.com/Morantron/tmux-fingers).

During a [Fosdem](https://fosdem.org/) conf, we had the idea to rewrite it to another language. He had these thoughts many times ago but it was hard to start from scratch. So, we decided to start playing with Node.js and [react-blessed](https://github.com/Yomguithereal/react-blessed), but we detected some unacceptable latency when the program booted. We didn't investigate much about this latency.

During those days another alternative appeared, called [tmux-picker](https://github.com/RTBHOUSE/tmux-picker), implemented in python and reusing many parts from [tmux-fingers](https://github.com/Morantron/tmux-fingers). It was nice, because it was fast and added original terminal color support.

I was curious to know if this was possible to be written in [Rust](https://www.rust-lang.org/), and soon I realized that was something doable. The ability to implement tests for all critic parts of the application give you a great confidence about it. On the other hand, Rust has an awesome community that lets you achieve this kind of project in a short period of time.

## Contribute

Expand Down

0 comments on commit 4c42803

Please sign in to comment.