Skip to content

Commit 5cc62c2

Browse files
author
Hiroki Konishi
committed
Update: add fzf option rule and snippet
1 parent 04917a0 commit 5cc62c2

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

rules/fzf_pmy_rules.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[
2+
{
3+
"regexpLeft": "^fzf (?P<body>.*)(-|--)(?P<query>.*)$",
4+
"cmdGroups": [
5+
{
6+
"tag": "",
7+
"stmt": "%fzf/option",
8+
"after": "awk '{print $1}' | sed -e 's/=.*/=/g'"
9+
}
10+
],
11+
"fuzzyFinderCmd": "fzf -0 -1 -q \"<query>\"",
12+
"bufferLeft": "fzf <body>",
13+
"bufferRight": "[]"
14+
}
15+
]

snippets/fzf/option.txt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
-x --extended Extended-search mode (enabled by default; +x or --no-extended to disable)
2+
-e --exact Enable Exact-match
3+
--algo=TYPE Fuzzy matching algorithm: [v1|v2] (default: v2)
4+
-i Case-insensitive match (default: smart-case match)
5+
+i Case-sensitive match
6+
--literal Do not normalize latin script letters before matching
7+
-n --nth=N[,..] Comma-separated list of field index expressions for limiting search scope. Each can be a non-zero integer or a range expression ([BEGIN]..[END]).
8+
--with-nth=N[,..] Transform the presentation of each line using field index expressions
9+
-d --delimiter=STR Field delimiter regex (default: AWK-style)
10+
+s --no-sort Do not sort the result
11+
--tac Reverse the order of the input
12+
--tiebreak=CRI[,..] Comma-separated list of sort criteria to apply when the scores are tied [length|begin|end|index] (default: length)
13+
-m --multi Enable multi-select with tab/shift-tab
14+
--no-mouse Disable mouse
15+
--bind=KEYBINDS Custom key bindings. Refer to the man page.
16+
--cycle Enable cyclic scroll
17+
--no-hscroll Disable horizontal scroll
18+
--hscroll-off=COL Number of screen columns to keep to the right of the highlighted substring (default: 10)
19+
--filepath-word Make word-wise movements respect path separators
20+
--jump-labels=CHARS Label characters for jump and jump-accept
21+
--height=HEIGHT[%] Display fzf window below the cursor with the given height instead of using fullscreen
22+
--min-height=HEIGHT Minimum height when --height is given in percent (default: 10)
23+
--layout=LAYOUT Choose layout: [default|reverse|reverse-list]
24+
--border Draw border above and below the finder
25+
--margin=MARGIN Screen margin (TRBL / TB,RL / T,RL,B / T,R,B,L)
26+
--inline-info Display finder info inline with the query
27+
--prompt=STR Input prompt (default: '> ')
28+
--header=STR String to print as header
29+
--header-lines=N The first N lines of the input are treated as header
30+
--ansi Enable processing of ANSI color codes
31+
--tabstop=SPACES Number of spaces for a tab character (default: 8)
32+
--color=COLSPEC Base scheme (dark|light|16|bw) and/or custom colors
33+
--no-bold Do not use bold text
34+
--history=FILE History file
35+
--history-size=N Maximum number of history entries (default: 1000)
36+
--preview=COMMAND Command to preview highlighted line ({})
37+
--preview-window=OPT Preview window layout (default: right:50%) [up|down|left|right][:SIZE[%]][:wrap][:hidden]
38+
-q --query=STR Start the finder with the given query
39+
-1 --select-1 Automatically select the only match
40+
-0 --exit-0 Exit immediately when there's no match
41+
-f --filter=STR Filter mode. Do not start interactive finder.
42+
--print-query Print query as the first line
43+
--expect=KEYS Comma-separated list of keys to complete fzf
44+
--read0 Read input delimited by ASCII NUL characters
45+
--print0 Print output delimited by ASCII NUL characters
46+
--sync Synchronous search for multi-staged filtering
47+
--version Display version information and exit

0 commit comments

Comments
 (0)