blob: d520c1d03f43cfa352d33967bfb63b9bba828156 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# tmux-fzf-url
[](https://github.com/tmux-plugins/tpm)
[](https://github.com/rothgar/awesome-tmux)
[](https://wfxr.mit-license.org/2018)
A tmux plugin for opening urls from browser quickly without mouse.

### 📥 Installation
Prerequisites:
* [`fzf`](https://github.com/junegunn/fzf)
* [`bash`](https://www.gnu.org/software/bash/) >= `4.0` (macOS ships with `bash` `3.2`!)
**Install using [TPM](https://github.com/tmux-plugins/tpm)**
Add this line to your tmux config file, then hit `prefix + I`:
``` tmux
set -g @plugin 'wfxr/tmux-fzf-url'
```
**Install manually**
Clone this repo somewhere and source `fzf-url.tmux` at the config file.
### 📝 Usage
The default key-binding is `u`(of course prefix hit is needed), it can be modified by
setting value to `@fzf-url-bind` at the tmux config like this:
``` tmux
set -g @fzf-url-bind 'x'
```
You can also extend the capture groups by defining `@fzf-url-extra-filter`:
``` tmux
# simple example for capturing files like 'abc.txt'
set -g @fzf-url-extra-filter 'grep -oE "\b[a-zA-Z]+\.txt\b"'
```
The plugin default captures the current screen. You can set `history_limit` to capture
the scrollback history:
```tmux
set -g @fzf-url-history-limit '2000'
```
You can use custom fzf options by defining `@fzf-url-fzf-options`.
```
# open tmux-fzf-url in a tmux v3.2+ popup
set -g @fzf-url-fzf-options '-w 50% -h 50% --multi -0 --no-preview --no-border'
```
### 💡 Tips
- You can mark multiple urls and open them at once.
- The tmux theme showed in the screenshot is [tmux-power](https://github.com/wfxr/tmux-power).
### 🔗 Other plugins
- [tmux-power](https://github.com/wfxr/tmux-power)
- [tmux-net-speed](https://github.com/wfxr/tmux-net-speed)
### 📃 License
[MIT](https://wfxr.mit-license.org/2018) (c) Wenxuan Zhang
|