-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathfzf_preview_vim.txt
868 lines (640 loc) · 27.4 KB
/
fzf_preview_vim.txt
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
*fzf-preview-vim.txt*
Author: yuki-yano
License: MIT
Version: 0.1
==============================================================================
CONTENTS *fzf-preview-contents*
Introduction |fzf-preview-introduction|
Installation |fzf-preview-installation|
Mappings |fzf-preview-mappings|
Commands |fzf-preview-commands|
Keymap |fzf-preview-keymap|
==============================================================================
INTRODUCTION *fzf-preview-introduction*
*fzf-preview* is Vim script RPC, coc extensions or Neovim remote plugin to
provide some fzf sources with preview.
Requirements:
- Neovim (Remote Plugin)
https://neovim.io/
- coc.nvim (coc extensions)
https://github.com/neoclide/coc.nvim
- Node
https://nodejs.org/
- git
https://git-scm.com/
- fzf
https://github.com/junegunn/fzf
- ripgrep (Require some preview)
https://github.com/BurntSushi/ripgrep
Optional:
- bat (Add color to the preview)
https://github.com/sharkdp/bat
- vim-devicons (Use devicons)
https://github.com/ryanoasis/vim-devicons
- Fugitive (Require git integration)
https://github.com/tpope/vim-fugitive
- Gina (Require git integration)
https://github.com/lambdalisue/gina.vim
- universal-ctags (Requre FzfPreviewCtags and FzfPreviewBufferTags)
https://github.com/universal-ctags/ctags
- vista.vim (Require FzfPreviewVistaCtags and FzfPreviewVistaBufferCtags)
https://github.com/liuchengxu/vista.vim
- vim-bookmarks (Require FzfPreviewBookmarks)
https://github.com/MattesGroeger/vim-bookmarks
- yankround.vim (Require FzfPreviewYankround)
https://github.com/LeafCage/yankround.vim
- memolist.vim (Require FzfPreviewMemoList and FzfPreviewMemoListGrep)
https://github.com/glidenote/memolist.vim
- todo-comments.nvim (Require FzfPreviewTodoComments)
https://github.com/folke/todo-comments.nvim
- GitHub cli (Require integrate with GitHub)
https://github.com/cli/cli
- Yarn (Build latest remote plugin)
https://classic.yarnpkg.com/
Latest version:
https://github.com/yuki-yano/fzf-preview.vim
==============================================================================
VIM SCRIPT RPC PLUGIN INSTALLATION *fzf-preview-vim-rpc-installation*
Use Dein, vim-plug or any Vim plugin manager of your choice.
Install release/rpc branch.
>
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'yuki-yano/fzf-preview.vim', { 'branch': 'release/rpc' }
<
or
>
call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
call dein#add('yuki-yano/fzf-preview.vim', { 'rev': 'release/rpc' })
<
==============================================================================
REMOTE PLUGIN INSTALLATION *fzf-preview-remote-installation*
Install the npm package [neovim](https://www.npmjs.com/package/neovim)
to get the remote plugin working.
>
$ npm install -g neovim
<
Use Dein, vim-plug or any Vim plugin manager of your choice.
Install release/remote branch and `:UpdateRemotePlugins`
when after installed plugin.
>
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'yuki-yano/fzf-preview.vim', { 'branch': 'release/remote', 'do': ':UpdateRemotePlugins' }
<
or
>
call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
call dein#add('yuki-yano/fzf-preview.vim', { 'rev': 'release/remote' })
<
==============================================================================
COC EXTENSION INSTALLATION *fzf-preview-coc-installation*
Install the [coc.nvim](https://github.com/neoclide/coc.nvim)
Install coc extensions fzf-preview.
use vim-plug:
>
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
<
use dein:
>
call dein#add('junegunn/fzf', { 'build': './install --all', 'merged': 0 })
call dein#add('neoclide/coc.nvim', { 'rev': 'release', 'merged': 0 })
<
execute after
:CocInstall coc-fzf-preview
==============================================================================
COMMANDS *fzf-preview-commands*
Vim script RPC, Remote Plugin, and coc extensions, in that order.
*:FzfPreviewProjectFiles*
:FzfPreviewProjectFilesRpc
:FzfPreviewProjectFiles
:CocCommand fzf-preview.ProjectFiles
Select and open git repository files from project.
*:FzfPreviewGitFiles*
:FzfPreviewGitFilesRpc
:FzfPreviewGitFiles
:CocCommand fzf-preview.GitFiles
Select and open git repository files from git ls-files.
*:FzfPreviewDirectoryFiles*
:FzfPreviewDirectoryFilesRpc {path or none}
:FzfPreviewDirectoryFiles {path or none}
:CocCommand fzf-preview.DirectoryFiles {path or none}
Select and open directory files from ripgrep with fzf interface.
Default to current working directory.
*:FzfPreviewBuffers*
:FzfPreviewBuffersRpc
:FzfPreviewBuffers
:CocCommand fzf-preview.Buffers
Select and open file buffers.
Use open-buffer processes.
*:FzfPreviewAllBuffers*
:FzfPreviewAllBuffersRpc
:FzfPreviewAllBuffers
:CocCommand fzf-preview.AllBuffers
Select and open all buffers(include not file).
Use open-bufnr processes.
*:FzfPreviewProjectOldFiles*
:FzfPreviewProjectOldFilesRpc
:FzfPreviewProjectOldFiles
:CocCommand fzf-preview.ProjectOldFiles
Select and open the past open files in the project using fzf.
The target file is selected from |v:oldfiles|.
*:FzfPreviewProjectMruFiles*
:FzfPreviewProjectMruFilesRpc
:FzfPreviewProjectMruFiles
:CocCommand fzf-preview.ProjectMruFiles
Select and open the past open files in the project using fzf.
The target file is selected from most recently used.
*:FzfPreviewProjectMrwFiles*
:FzfPreviewMrwFilesRpc
:FzfPreviewMrwFiles
:CocCommand fzf-preview.MrwFiles
Select and open the past open files in the project using fzf.
The target file is selected from most recently written.
*:FzfPreviewProjectGrep*
:FzfPreviewProjectGrepRpc
:FzfPreviewProjectGrep
:CocCommand fzf-preview.ProjectGrep
Search text from the project.
The retrieved result is displayed in file name, number of lines, preview
and can be opened with fzf interface.
*:FzfPreviewProjectGrepRecall*
:FzfPreviewProjectGrepRecallRpc
:FzfPreviewProjectGrepRecall
:CocCommand fzf-preview.ProjectGrepRecall
Run FzfPreviewProjectGrep with the same arguments as before.
*:FzfPreviewCTags*
:FzfPreviewCtagsRpc
:FzfPreviewCtags
:CocCommand fzf-preview.Ctags
Select tags from tags file
The same script as FzfPreviewProjectGrep is used for preview.
Required: |universal-ctags|
Cautions:
Set --excmd=number or --excmd=combine to universal-ctags option
*:FzfPreviewBufferTags*
:FzfPreviewBufferTagsRpc
:FzfPreviewBufferTags
:CocCommand fzf-preview.BufferTags
Select from tags of currently open buffer
The same script as FzfPreviewProjectGrep is used for preview.
Required: |universal-ctags|
*:FzfPreviewOldFiles*
:FzfPreviewOldFilesRpc
:FzfPreviewOldFiles
:CocCommand fzf-preview.OldFiles
Select and open the opened file.
For the target file, see |v:oldfiles|.
*:FzfPreviewMruFiles*
:FzfPreviewMruFilesRpc
:FzfPreviewMruFiles
:CocCommand fzf-preview.MruFiles
Select and open the opened file.
For the target file, most recently used.
*:FzfPreviewMrwFiles*
:FzfPreviewMrwFilesRpc
:FzfPreviewMrwFiles
:CocCommand fzf-preview.MrwFiles
Select and open the opened file.
For the target file, most recently written.
*:FzfPreviewQuickFix*
:FzfPreviewQuickFixRpc
:FzfPreviewQuickFix
:CocCommand fzf-preview.QuickFix
Select and open the QuickFix item.
*:FzfPreviewLocationList*
:FzfPreviewLocationListRpc
:FzfPreviewLocationList
:CocCommand fzf-preview.LocationList
Select and open the LocationList item.
*:FzfPreviewLines*
:FzfPreviewLinesRpc
:FzfPreviewLines
:CocCommand fzf-preview.Lines
Select line from current buffer.
*:FzfPreviewBufferLines*
:FzfPreviewBufferLinesRpc
:FzfPreviewBufferLines
:CocCommand fzf-preview.BufferLines
Select line from all buffer
*:FzfPreviewJumps*
:FzfPreviewJumpsRpc
:FzfPreviewJumps
:CocCommand fzf-preview.Jumps
Select and open the jumplist
*:FzfPreviewChanges*
:FzfPreviewChangesRpc
:FzfPreviewChanges
:CocCommand fzf-preview.Changes
Select and open the changelist
*:FzfPreviewMarks*
:FzfPreviewMarksRpc
:FzfPreviewMarks
:CocCommand fzf-preview.Marks
List marks from the project.
The retrieved result is displayed in file name, number of lines.
The same script as FzfPreviewProjectGrep is used for preview.
*:FzfPreviewFromResources*
:FzfPreviewFromResourcesRpc
:FzfPreviewFromResources
:CocCommand fzf-preview.FromResources
Select a resource and generate a file list.
From there, select the file using the fzf interface.
Resources: [project, git, directory, buffer, project_old,
project_mru, project_mrw, old, mru, mrw]
*:FzfPreviewCommandPalette*
:FzfPreviewCommandPaletteRpc
:FzfPreviewCommandPalette
:CocCommand fzf-preview.CommandPalette
Execute and edit command history
*:FzfPreviewGrepHelp*
:FzfPreviewGrepHelpRpc
:FzfPreviewGrepHelp
:CocCommand fzf-preview.GrepHelp
Grep vim help.
*:FzfPreviewGitStatus*
:FzfPreviewGitStatusRpc
:FzfPreviewGitStatus
:CocCommand fzf-preview.GitStatus
Git status integration.
*:FzfPreviewGitActions*
:FzfPreviewGitActionsRpc
:FzfPreviewGitActions
:CocCommand fzf-preview.GitActions
Interactive git integration.
Select resource and action.
*:FzfPreviewVistaCtags*
:FzfPreviewVistaCtagsRpc
:FzfPreviewVistaCtags
:CocCommand fzf-preview.VistaCtags
Select tags from vista.vim.
Required: vista.vim
*:FzfPreviewVistaBufferCtags*
:FzfPreviewVistaBufferCtagsRpc
:FzfPreviewVistaBufferCtags
:CocCommand fzf-preview.VistaBufferCtags
Select current buffer tags from vista.vim.
Required: vista.vim
*:FzfPreviewNvimLspReferences*
:FzfPreviewNvimLspReferencesRpc
:FzfPreviewNvimLspReferences
Select and open the references from nvim-lsp.
*:FzfPreviewNvimLspDiagnostics*
:FzfPreviewNvimLspDiagnosticsRpc
:FzfPreviewNvimLspDiagnostics
Select and open the diagnostics from nvim-lsp.
*:FzfPreviewNvimLspCurrentDiagnostics*
:FzfPreviewNvimLspCurrentDiagnosticsRpc
:FzfPreviewNvimLspCurrentDiagnostics
Select and open the current file diagnostics from nvim-lsp.
*:FzfPreviewNvimLspDefinitions*
:FzfPreviewNvimLspDefinitionRpc
:FzfPreviewNvimLspDefinition
Select and open the definitions from nvim-lsp.
*:FzfPreviewNvimLspTypeDefinitions*
:FzfPreviewNvimLspTypeDefinitionsRpc
:FzfPreviewNvimLspTypeDefinition
Select and open the type definitions from nvim-lsp.
*:FzfPreviewNvimLspImplementations*
:FzfPreviewNvimLspImplementationsRpc
:FzfPreviewNvimLspImplementations
Select and open the implementations from nvim-lsp.
*:FzfPreviewVimLspReferences*
:FzfPreviewVimLspReferencesRpc
:FzfPreviewVimLspReferences
Select and open the references from vim-lsp.
*:FzfPreviewVimLspDiagnostics*
:FzfPreviewVimLspDiagnosticsRpc
:FzfPreviewVimLspDiagnostics
Select and open the diagnostics from vim-lsp.
*:FzfPreviewVimLspCurrentDiagnostics*
:FzfPreviewVimLspCurrentDiagnosticsRpc
:FzfPreviewVimLspCurrentDiagnostics
Select and open the current file diagnostics from vim-lsp.
*:FzfPreviewVimLspDefinitions*
:FzfPreviewVimLspDefinitionRpc
:FzfPreviewVimLspDefinition
Select and open the definitions from vim-lsp.
*:FzfPreviewVimLspTypeDefinitions*
:FzfPreviewVimLspTypeDefinitionsRpc
:FzfPreviewVimLspTypeDefinition
Select and open the type definitions from vim-lsp.
*:FzfPreviewVimLspImplementations*
:FzfPreviewVimLspImplementationsRpc
:FzfPreviewVimLspImplementations
Select and open the implementations from vim-lsp.
*:FzfPreviewBookmarks*
:FzfPreviewBookmarksRpc
:FzfPreviewBookmarks
:CocCommand fzf-preview.Bookmarks
Select and open the bookmarks from vim-bookmarks
*:FzfPreviewYankround*
:FzfPreviewYankroundRpc
:FzfPreviewYankround
:CocCommand fzf-preview.Yankround
Select register history and insert " register from yankround.vim
Use register processes.
*:FzfPreviewMemoList*
:FzfPreviewMemoListRpc
:FzfPreviewMemoList
:CocCommand fzf-preview.MemoList
Select memolist and open from memolist.vim.
*:FzfPreviewMemoListGrep*
:FzfPreviewMemoListGrepRpc
:FzfPreviewMemoListGrep
:CocCommand fzf-preview.MemoListGrep
Grep memolist and open from memolist.vim.
*:FzfPreviewTodoComments*
:FzfPreviewTodoCommentsRpc
:FzfPreviewTodoComments
:CocCommand fzf-preview.TodoComments
Search TodoComments from todo-comments.nvim
*:FzfPreviewBlamePR*
:FzfPreviewBlamePRRpc
:FzfPreviewBlamePR
:CocCommand fzf-preview.BlamePR
The PR corresponding to each line is displayed and
the selected PR is opened in the browser.
Use open-pr processes.
*:FzfPreviewCocReferences*
:CocCommand fzf-preview.CocReferences
Select and open the references from coc.nvim.
Only coc extensions.
*:FzfPreviewCocDiagnostics*
:CocCommand fzf-preview.CocDiagnostics
Select and open the diagnostics from coc.nvim.
Only coc extensions.
*:FzfPreviewCocCurrentDiagnostics*
:CocCommand fzf-preview.CocCurrentDiagnostics
Select and open the current file diagnostics from coc.nvim.
Only coc extensions.
*:FzfPreviewCocDefinition*
:CocCommand fzf-preview.CocDefinition
Select and open the definitions from coc.nvim.
Only coc extensions.
*:FzfPreviewCocTypeDefinition*
:CocCommand fzf-preview.CocTypeDefinition
Select and open the type definitions from coc.nvim.
Only coc extensions.
*:FzfPreviewCocImplementations*
:CocCommand fzf-preview.CocImplementations
Select and open the implementations from coc.nvim.
Only coc extensions.
*:FzfPreviewCocOutline*
:CocCommand fzf-preview.CocOutline
Select and open the outline from coc.nvim.
Only coc extensions.
==============================================================================
COMMAND OPTIONS *fzf-preview-command-options*
--processes
Set process when selecting element with fzf started by this command.
Value must be a global variable name.
Variable is dictionary and format is
same as get from |fzf_preview#remote#process#get_default_processes|.
Most command pass a file paths to the process.
FzfPreviewAllBuffers will be passed “buffer {bufnr}”
Value example: let g:foo_processes = {
\ 'enter': 'FzfPreviewOpenFileEnter',
\ 'ctrl-x': get(function('s:foo_function'), 'name'),
\ }
--add-fzf-arg
Set the arguments to be passed when executing fzf.
This value is added to the default options.
Value must be a string without spaces.
Usage example: Exclude filename with FzfPreviewProjectGrep
>
nnoremap <Leader>g :<C-u>FzfPreviewProjectGrep --add-fzf-arg=--nth=3<Space>
" nnoremap <Leader>g :<C-u>CocCommand fzf-preview.ProjectGrep --add-fzf-arg=--nth=3<Space>
<
--resume
Reuse the input that was last used to select the element with fzf.
Do not need to pass a value for this option.
Usage example: Reuse last query for project grep.
>
nnoremap <Leader>G :<C-u>FzfPreviewProjectGrep . --resume<Space>
" nnoremap <Leader>G :<C-u>CocCommand fzf-preview.ProjectGrep . --resume<Space>
<
==============================================================================
OPTIONS *fzf-preview-options*
*g:fzf_preview_floating_window_rate*
This value is used for the size of the floating window.
The size of the floating window is the size of the vim multiplied
by this value.
Set between 0 and 1.
Default value is 0.9
*g:fzf_preview_direct_window_option*
This value is used to position the window.
It is passed to the window option of |fzf#run|, and
|g:fzf_preview_floating_window_rate| is disabled.
Default value is ''
*g:fzf_preview_default_fzf_options*
It is used as the default option when starting fzf.
Set a dictionary variable whose option name is key.
The string you pass to value is automatically enclosed in double quotes.
If the value to be passed to the option is empty, set v:true.
Default value is { '--reverse': v:true, '--preview-window': 'wrap' }
*g:fzf_preview_quit_map*
If this value is 1, mapping that will safely quit
in fzf's normal mode and visual mode is added
Default value is 1
*g:fzf_preview_command*
Shell command used for fzf preview. The head command is used by default.
If the bat command is installed, the bat is used by default and
the preview is syntax highlighted.
Not installed bat:
Default value is 'cat'
Installed bat:
Default value is 'bat --color=always --plain {-1}'
*g:fzf_preview_if_binary_command*
g:fzf_binary_preview_command is executed if this command succeeds,
and g:fzf_preview_command is executed if it fails
Default value is '[[ "$(file --mime {})" =~ binary ]]'
*g:fzf_binary_preview_command*
Shell command used for binary file preview.
Since it is heavy to display in text, if there is no particular reason,
echo etc. substitute.
Default value is 'echo "{} is a binary file"'
*g:fzf_preview_filelist_command*
This is the command used to search for files in the project.
If ripgrep is not included, git ls-files will be used.
Installed ripgrep:
Default value is 'rg --files --hidden --follow --no-messages --glob "!.git/*" --glob \!"* *"'
Not installed ripgrep:
Default value is 'git ls-files --exclude-standard'
*g:fzf_preview_git_files_command*
This is the command used to search for files in the git repository.
Default value is 'git ls-files --exclude-standard'
*g:fzf_preview_directory_files_command*
This is the command used to search for files in the current directory.
Default value is 'rg --files --hidden --follow --no-messages -g \!"* *"'
Keep in mind a path can be append at the end of the command.
*g:fzf_preview_git_status_command*
This is the command used to git status files
Default value is 'git -c color.status=always status --short --untracked-files=all'
*g:fzf_preview_git_status_preview_command*
This is the command used to git status preview
Default value is "[[ $(git diff --cached -- {-1}) != \"\" ]] && git diff --cached --color=always -- {-1} || " .
\ "[[ $(git diff -- {-1}) != \"\" ]] && git diff --color=always -- {-1} || " .
\ g:fzf_preview_command
*g:fzf_preview_grep_cmd*
This command is used for project grep.
Recommend using a fast grep command such as ripgrep or ag.
Interactively grep the specified directory.
Installed ripgrep:
Default value is 'rg --line-number --no-heading --color=never --hidden'
Not installed ripgrep:
:ProjectGrepPreview is disabled.
*g:fzf_preview_cache_directory*
Specify the directory to store the MRU and MRW cache files.
Default value is 'expand('~/.cache/vim/fzf_preview')'
*g:fzf_preview_disable_mru*
If this value is not 0, disable mru and mrw.
Default value is 0
*g:fzf_preview_mru_limit*
Limit of the number of files to be saved by mru.
Default value is 1000
*g:fzf_preview_lines_command*
This command is used for get current file lines.
Installed bat:
Default value is 'bat --color=always --plain --number'
Not installed bat:
Default value is 'cat -n'
*g:fzf_preview_grep_preview_cmd*
This command is used for :ProjectGrepPreview. bin/preview.rb is used by default.
Default value is 'expand("<sfile>:h:h") . "/bin/preview.rb"'
*g:fzf_preview_preview_key_bindings*
This command determines keyboard shortcuts during an interactive FZF
session. Options are a string passed directly to fzf's "--bind" option.
Default value is ''
*g:fzf_preview_fzf_color_option*
Specify the color option to be passed to the fzf command.
Options are a string passed directly to fzf's "--color" option.
Default value is ''
*g:fzf_preview_custom_processes*
Set the custom processes.
Dictionary format is { '{processes_name}': { '{input_key}': |String|(Global function name) } }
Default child value can be get with |fzf_preview#remote#process#get_default_processes|
Default value is {}
Example: {
'open-file': {
'ctrl-o': 'FzfPreviewOpenFileCtrlO',
'ctrl-q': 'FzfPreviewOpenFileCtrlQ',
'ctrl-t': 'FzfPreviewOpenFileCtrlT',
'ctrl-v': 'FzfPreviewOpenFileCtrlV',
'ctrl-x': 'FzfPreviewOpenFileCtrlX',
'enter': 'FzfPreviewOpenFileEnter'
},
'register': {
'enter': 'FzfPreviewRegisterEnter'
}
}
*g:fzf_preview_fzf_preview_window_option*
Used as fzf preview-window option
For example, 'up:30%'
Default value is ''
*g:fzf_preview_use_dev_icons*
If this value is 1, devicons is used as fzf candidate.
Default value is 0
*g:fzf_preview_history_dir*
If this value is directory path, use the files in the target directory
and the fzf history option will be enabled.
For example, '~/.fzf'
Default value is false
*g:fzf_preview_dev_icon_prefix_string_length*
Set how many string length devicon is represented.
Default value is 3
*g:fzf_preview_dev_icons_limit*
Devicons can make fzf-preview slow when the number of results is high.
By default icons are disable when number of results is higher this value.
Default value is 5000
*g:fzf_preview_yankround_preview_command*
Command to preview yankround history.
Defaul value is expand('<sfile>:h:h') . '/bin/preview_yankround_register'
*g:fzf_preview_blame_pr_command*
Command to FzfPreviewBlamePR source.
Defaul value is expand('<sfile>:h:h') . '/bin/git_blame_pr'
*g:fzf_preview_update_statusline*
If true, statusline is updated during fzf-preview startup.
Defaul value is true
*$FZF_PREVIEW_PREVIEW_BAT_THEME*
The theme used in the bat preview.
Default value is 'OneHalfDark'
*$FZF_PREVIEW_PLUGIN_HELP_ROOT_DIR*
The root directory to be searched by GrepHelp.
Default value is ''
==============================================================================
FUNCTIONS *fzf-preview-functions*
*fzf_preview#remote#process#get_default_processes*
Get the initial value of the processes.
Args is {process_name} and {plugin_type (optional)}.
processes_name is 'open-file', 'open-buffer' and 'open-bufnr'.
plugin_type is 'remote', 'coc' or 'rpc'. Default value is 'remote'.
value from 'open-file' (and 'remote') is
{
'ctrl-o': 'FzfPreviewOpenFileCtrlO',
'ctrl-q': 'FzfPreviewOpenFileCtrlQ',
'ctrl-t': 'FzfPreviewOpenFileCtrlT',
'ctrl-v': 'FzfPreviewOpenFileCtrlV',
'ctrl-x': 'FzfPreviewOpenFileCtrlX',
'enter': 'FzfPreviewOpenFileEnter'
}
value from 'open-file' and 'coc' is
{
'ctrl-o': 'OpenFileCtrlO',
'ctrl-q': 'OpenFileCtrlQ',
'ctrl-t': 'OpenFileCtrlT',
'ctrl-v': 'OpenFileCtrlV',
'ctrl-x': 'OpenFileCtrlX',
'enter': 'OpenFileEnter'
}
value from 'open-file' and 'rpc' is
{
'ctrl-o': 'FzfPreviewOpenFileCtrlO',
'ctrl-q': 'FzfPreviewOpenFileCtrlQ',
'ctrl-t': 'FzfPreviewOpenFileCtrlT',
'ctrl-v': 'FzfPreviewOpenFileCtrlV',
'ctrl-x': 'FzfPreviewOpenFileCtrlX',
'enter': 'FzfPreviewOpenFileEnter'
}
==============================================================================
USER AUTOCMD EVENTS *fzf-preview-user-autocmd-events*
*fzf_preview#remote#initialized*
Runs when initialization of the Remote Plugin is complete.
*fzf_preview#rpc#initialized*
Runs when initialization of the Vim script RPC is complete.
*fzf_preview#coc#initialized*
Runs when initialization of the coc extensions is complete.
Deprecated
*fzf_preview#initialized*
Runs when initialization of the Remote Plugin, coc extensions and
Vim script RPC is complete.
==============================================================================
BASE DEFAULT KEYMAP *fzf-preview-keymap*
<C-g>, <Esc>
- Cancel fzf
<C-x>
- Open split
<C-v>
- Open vsplit
<C-t>
- Open tabedit
<C-o>
- Open drop
<C-q>
- Build QuickFix from open-file processes.
- Execute :bdelete! command from open-buffer and open-bufnr processes.
<C-d>
- Preview page down
<C-u>
- Preview page up
?
- Toggle Preview
==============================================================================
EXAMPLE *fzf-preview-mappings*
Here is mapping example.
>
nnoremap <silent> <Leader>p :<C-u>FzfPreviewProjectFiles<CR>
nnoremap <silent> <Leader>b :<C-u>FzfPreviewBuffers<CR>
nnoremap <silent> <Leader>m :<C-u>FzfPreviewProjectOldFiles<CR>
nnoremap <silent> <Leader>M :<C-u>FzfPreviewOldFiles<CR>
<
vim:tw=78:sw=2:ts=2:ft=help:norl:nowrap: