tmux-fuzzy-motion 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +21 -5
- package/README.md +22 -5
- package/dist/cli.js +682 -389
- package/package.json +2 -1
package/README.ja.md
CHANGED
|
@@ -14,8 +14,9 @@ CLI です。現在の viewport からジャンプ対象を抽出し、fuzzy sea
|
|
|
14
14
|
- `fzf` による fuzzy match
|
|
15
15
|
- `jsmigemo` による英字 query の Migemo マッチ
|
|
16
16
|
- overlay 描画時も pane の色を維持
|
|
17
|
+
- 外部 daemon を再利用し、matcher と Migemo の起動コストを常駐側へ寄せる
|
|
17
18
|
- 単一キーの大文字 hint で素早く選択
|
|
18
|
-
-
|
|
19
|
+
- UI は tmux popup で表示し、常駐用の scratch window を作らない
|
|
19
20
|
|
|
20
21
|
## 動作要件
|
|
21
22
|
|
|
@@ -51,8 +52,15 @@ npx tmux-fuzzy-motion@latest doctor
|
|
|
51
52
|
`tmux.conf` に次を追加してください。
|
|
52
53
|
|
|
53
54
|
```tmux
|
|
54
|
-
bind-key -T copy-mode-vi s run-shell
|
|
55
|
-
bind-key -T copy-mode s run-shell
|
|
55
|
+
bind-key -T copy-mode-vi s run-shell 'tmux-fuzzy-motion start #{pane_id} #{client_tty}'
|
|
56
|
+
bind-key -T copy-mode s run-shell 'tmux-fuzzy-motion start #{pane_id} #{client_tty}'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
`run-shell` を経由せずに tmux から直接 popup を開きたい場合は、次の設定も使えます。
|
|
60
|
+
|
|
61
|
+
```tmux
|
|
62
|
+
bind-key -T copy-mode-vi s run-shell -C "display-popup -E -B -x '##{popup_pane_left}' -y '##{popup_pane_top}' -w '#{pane_width}' -h '#{pane_height}' 'tmux-fuzzy-motion popup-live #{pane_id}'"
|
|
63
|
+
bind-key -T copy-mode s run-shell -C "display-popup -E -B -x '##{popup_pane_left}' -y '##{popup_pane_top}' -w '#{pane_width}' -h '#{pane_height}' 'tmux-fuzzy-motion popup-live #{pane_id}'"
|
|
56
64
|
```
|
|
57
65
|
|
|
58
66
|
設定変更後は tmux を reload します。
|
|
@@ -84,10 +92,12 @@ tmux source-file ~/.tmux.conf
|
|
|
84
92
|
|
|
85
93
|
```text
|
|
86
94
|
tmux-fuzzy-motion start <pane-id> <client-tty>
|
|
95
|
+
tmux-fuzzy-motion popup-live <pane-id>
|
|
87
96
|
tmux-fuzzy-motion doctor
|
|
88
97
|
```
|
|
89
98
|
|
|
90
|
-
`
|
|
99
|
+
`popup` と `daemon` は内部サブコマンドです。`popup-live` は `display-popup`
|
|
100
|
+
から直接起動する設定向けです。
|
|
91
101
|
|
|
92
102
|
## Doctor
|
|
93
103
|
|
|
@@ -131,11 +141,17 @@ pnpm run dev
|
|
|
131
141
|
pnpm check
|
|
132
142
|
```
|
|
133
143
|
|
|
144
|
+
warm な daemon を前提に popup 起動時間を測る場合:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
pnpm bench:startup dist/cli.js
|
|
148
|
+
```
|
|
149
|
+
|
|
134
150
|
## 制約
|
|
135
151
|
|
|
136
152
|
- 対象は現在の viewport のみ
|
|
137
153
|
- `copy-mode` 専用
|
|
138
154
|
- query 入力は ASCII 寄り
|
|
139
155
|
- combining character の完全な扱いは未保証
|
|
140
|
-
-
|
|
156
|
+
- `display-popup` が必要なため、tmux 3.2 以上が必須
|
|
141
157
|
- query は pane 内の最下行右端に描画する
|
package/README.md
CHANGED
|
@@ -14,8 +14,9 @@ Japanese text through Migemo.
|
|
|
14
14
|
- Supports fuzzy matching with `fzf`
|
|
15
15
|
- Supports Migemo matching for alphabetic queries via `jsmigemo`
|
|
16
16
|
- Preserves pane colors while drawing the overlay
|
|
17
|
+
- Reuses an external daemon process so matcher and Migemo startup stay warm
|
|
17
18
|
- Uses single-key uppercase hints for fast selection
|
|
18
|
-
-
|
|
19
|
+
- Opens the UI in a tmux popup instead of creating a persistent scratch window
|
|
19
20
|
|
|
20
21
|
## Requirements
|
|
21
22
|
|
|
@@ -51,8 +52,16 @@ npx tmux-fuzzy-motion@latest doctor
|
|
|
51
52
|
Add these bindings to your `tmux.conf`:
|
|
52
53
|
|
|
53
54
|
```tmux
|
|
54
|
-
bind-key -T copy-mode-vi s run-shell
|
|
55
|
-
bind-key -T copy-mode s run-shell
|
|
55
|
+
bind-key -T copy-mode-vi s run-shell 'tmux-fuzzy-motion start #{pane_id} #{client_tty}'
|
|
56
|
+
bind-key -T copy-mode s run-shell 'tmux-fuzzy-motion start #{pane_id} #{client_tty}'
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If you want tmux to open the popup directly and avoid the extra `run-shell`
|
|
60
|
+
hop, use this instead:
|
|
61
|
+
|
|
62
|
+
```tmux
|
|
63
|
+
bind-key -T copy-mode-vi s run-shell -C "display-popup -E -B -x '##{popup_pane_left}' -y '##{popup_pane_top}' -w '#{pane_width}' -h '#{pane_height}' 'tmux-fuzzy-motion popup-live #{pane_id}'"
|
|
64
|
+
bind-key -T copy-mode s run-shell -C "display-popup -E -B -x '##{popup_pane_left}' -y '##{popup_pane_top}' -w '#{pane_width}' -h '#{pane_height}' 'tmux-fuzzy-motion popup-live #{pane_id}'"
|
|
56
65
|
```
|
|
57
66
|
|
|
58
67
|
Reload tmux after editing the config:
|
|
@@ -84,10 +93,12 @@ tmux source-file ~/.tmux.conf
|
|
|
84
93
|
|
|
85
94
|
```text
|
|
86
95
|
tmux-fuzzy-motion start <pane-id> <client-tty>
|
|
96
|
+
tmux-fuzzy-motion popup-live <pane-id>
|
|
87
97
|
tmux-fuzzy-motion doctor
|
|
88
98
|
```
|
|
89
99
|
|
|
90
|
-
`
|
|
100
|
+
`popup` and `daemon` are internal subcommands. `popup-live` is intended for
|
|
101
|
+
direct `display-popup` bindings.
|
|
91
102
|
|
|
92
103
|
## Doctor
|
|
93
104
|
|
|
@@ -131,11 +142,17 @@ Run the full local check:
|
|
|
131
142
|
pnpm check
|
|
132
143
|
```
|
|
133
144
|
|
|
145
|
+
Measure popup startup against a warm daemon:
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
pnpm bench:startup dist/cli.js
|
|
149
|
+
```
|
|
150
|
+
|
|
134
151
|
## Limitations
|
|
135
152
|
|
|
136
153
|
- Targets are limited to the current viewport
|
|
137
154
|
- Designed for `copy-mode` only
|
|
138
155
|
- Query input is ASCII-oriented
|
|
139
156
|
- Exact behavior for combining characters is not fully guaranteed
|
|
140
|
-
-
|
|
157
|
+
- Requires `display-popup`, so tmux 3.2 or later is mandatory
|
|
141
158
|
- The query is drawn on the bottom row inside the pane, aligned to the right edge
|