-
-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathdefx.txt
1169 lines (892 loc) · 30.7 KB
/
defx.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
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
*defx.txt* Dark powered file explorer for neovim/Vim8.
Version: 2.0
Author: Shougo <Shougo.Matsu at gmail.com>
License: MIT license
CONTENTS *defx-contents*
Introduction |defx-introduction|
Install |defx-install|
Interface |defx-interface|
Commands |defx-commands|
Functions |defx-functions|
Key mappings |defx-key-mappings|
Actions |defx-actions|
Options |defx-options|
Columns |defx-columns|
External columns |defx-external-columns|
Sources |defx-sources|
Denite Sources |defx-denite-sources|
Examples |defx-examples|
FAQ |defx-faq|
Compatibility |defx-compatibility|
==============================================================================
INTRODUCTION *defx-introduction*
*defx* is the abbreviation of "dark powered file explorer".
==============================================================================
INSTALL *defx-install*
Note: defx requires Neovim 0.4.0+ or Vim8.2+ with Python3.6.1+.
Note: The latest Neovim is recommended, because it is faster.
Please install nvim-yarp plugin for Vim8.
https://github.com/roxma/nvim-yarp
Please install vim-hug-neovim-rpc plugin for Vim8.
https://github.com/roxma/vim-hug-neovim-rpc
1. Extract the files and put them in your Neovim or .vim directory
(usually `$XDG_CONFIG_HOME/nvim/`).
2. Execute the ":UpdateRemotePlugins" if Neovim.
If ":echo has('python3')" returns `1`, then you're done; otherwise, see below.
You can enable Python3 interface with pip: >
pip3 install --user pynvim
Note: defx needs pynvim ver.0.1.8+. You need update pynvim module.
>
pip3 install --user --upgrade pynvim
<
If you want to read for pynvim/python3 interface install documentation,
you should read |provider-python| and the Wiki.
https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim
You can check the Python3 installation by |:checkhealth| command in neovim.
==============================================================================
INTERFACE *defx-interface*
------------------------------------------------------------------------------
COMMANDS *defx-commands*
:Defx [{options}] {paths} *:Defx*
Creates a new Defx buffer.
Note: If you want to open {paths} that have spaces or colons,
you must escape them.
------------------------------------------------------------------------------
FUNCTIONS *defx-functions*
defx#async_action({action}[, {args}]) *defx#async_action()*
Fire {action} action with {args} asynchronously. You can find
the actions list in |defx-actions|.
{args} behavior depends on {action}.
Note: {args} must be |list| if it is not single value.
Note: It is only used to define mappings.
Note: You cannot fire the next action until the previous
action is finished.
*defx#call_action()*
defx#call_action({action}[, {args}])
Fire {action} action with {args}. You can find the actions
list in |defx-actions|.
{args} behavior depends on {action}.
Note: {args} must be |list| if it is not single value.
*defx#call_async_action()*
defx#call_async_action({action}[, {args}])
Fire {action} action with {args} asynchronously. You can find
the actions list in |defx-actions|.
{args} behavior depends on {action}.
Note: {args} must be |list| if it is not single value.
Note: You cannot fire the next action until the previous
action is finished.
*defx#custom#column()*
defx#custom#column({column-name}, {option-name}, {value})
defx#custom#column({column-name}, {dict})
Set {column-name} column specialized variable {variable-name}
to {value}. You may specify multiple sources with the
separator "," in {column-name}. >
call defx#custom#column('icon', {
\ 'directory_icon': '▸ ',
\ 'file_icon': ' ',
\ 'opened_icon': '▾ ',
\ 'root_icon': ' ',
\ })
call defx#custom#column('mark', {
\ 'readonly_icon': '✗',
\ 'selected_icon': '✓',
\ })
<
*defx#custom#option()*
defx#custom#option({buffer-name}, {option-name}, {value})
defx#custom#option({buffer-name}, {dict})
Set {option-name} option to {value} in {buffer-name}
buffer.
If {buffer-name} is "_", the options are used for all buffers.
If {dict} is available, the key is {option-name} and the value
is {value}.
Note: The all options are in |defx-options|. However, "-" is
substituted to "_", and "-" prefix is removed. >
call defx#custom#option('_', {
\ 'columns': 'mark:indent:icon:filename:type:size:time',
\ })
<
*defx#custom#source()*
defx#custom#source({source-name}, {var-name}, {value})
defx#custom#source({source-name}, {dict})
Set {source-name} source specialized variable {variable-name}
to {value}. You may specify multiple sources with the
separator "," in {source-name}.
>
function! Root(path) abort
return fnamemodify(a:path, ':t')
endfunction
call defx#custom#source('file', {
\ 'root': 'Root',
\})
<
defx#do_action({action}[, {args}]) *defx#do_action()*
Fire {action} action with {args}. You can find the actions
list in |defx-actions|.
{args} behavior depends on {action}.
Note: It is only used to define mappings.
defx#get_candidate() *defx#get_candidate()*
Returns the current cursor candidate as |Dictionary|.
defx#get_candidates() *defx#get_candidates()*
Returns the candidates as |List| of |Dictionary|.
*defx#get_selected_candidates()*
defx#get_selected_candidates()
Returns the selected or cursor candidates as |List| of
|Dictionary|.
defx#get_context() *defx#get_context()*
Returns the current context as |Dictionary|.
defx#is_binary() *defx#is_binary()*
Returns |v:true| if the current cursor candidate is binary
file.
Example: >
nnoremap <silent><buffer><expr> <CR>
\ defx#is_binary() ?
\ defx#do_action('execute_system') :
\ defx#do_action('open')
defx#is_directory() *defx#is_directory()*
Returns |v:true| if the current cursor candidate is directory.
Example: >
nnoremap <silent><buffer><expr> <CR>
\ defx#is_directory() ?
\ defx#do_action('open_directory') :
\ defx#do_action('multi', ['drop', 'quit'])
defx#is_opened_tree() *defx#is_opened_tree()*
Returns |v:true| if the current cursor candidate is opened
directory tree.
defx#redraw() *defx#redraw()*
Redraw all defx windows.
------------------------------------------------------------------------------
KEY MAPPINGS *defx-key-mappings*
Defx does not provide any of default key mappings.
You need to define original key mappings by |defx#do_action()|.
------------------------------------------------------------------------------
ACTIONS *defx-actions*
add_session *defx-action-add_session*
Add the current directory in current sessions and save to
|defx-option-session-file|.
Note: You must set to |defx-option-session-file| save current
sessions.
Current session feature saves below states.
* current path
* opened tree state
Action args:
0. session directory path
call *defx-action-call*
Call the function.
You can get the files path as "a:context.targets".
Action args:
0. function name
Note: It must be string. You cannot use |Funcref| or
|lambda|.
Example: >
function! Test(context) abort
echomsg string(a:context.targets)
endfunction
nnoremap <silent><buffer><expr> f
\ defx#do_action('call', 'Test')
" or you can use SID hack
function! s:Test(context) abort
echomsg string(a:context.targets)
endfunction
function! s:SID_PREFIX() abort
return matchstr(expand('<sfile>'),
\ '<SNR>\d\+_\zeSID_PREFIX$')
endfunction
let g:sid = s:SID_PREFIX()
nnoremap <silent><buffer><expr> f
\ defx#do_action('call', g:sid.'Test')
cd *defx-action-cd*
Change the current directory.
Note: If the action args is empty, it means the home
directory.
Action args:
0. new current directory path
1. if it is "open", open previous current directory
2. if it is "nohist", don't save directory history
change_filtered_files *defx-action-change_filtered_files*
Change |defx-option-filtered-files| dynamically.
Action args:
0. filtered files pattern
change_ignored_files *defx-action-change_ignored_files*
Change |defx-option-ignored-files| dynamically.
Action args:
0. ignored files pattern
change_vim_cwd *change_vim_cwd*
Change current working directory to the current directory.
Note: It changes global current directory if the window has
not local current directory. If you don't like the behavior,
you need to set local current directory.
clear_clipboard *defx-action-clear_clipboard*
Clear current defx clipboard.
clear_select_all *defx-action-clear_select_all*
Clear the all candidates select.
close_tree *defx-action-close_tree*
Close the directory tree.
copy *defx-action-copy*
Copy the selected files to defx clipboard.
drop *defx-action-drop*
Open the file like |:drop| command.
It opens the last accessed window or already opened window.
Action args:
0. open command(The default is |:edit|)
execute_command *defx-action-execute_command*
Execute the command.
If the argument is "%", it substitutes one file.
If the argument is "*", it substitutes the selected files.
Example:
You selected files "foo", "bar", "baz".
(Input) "echo %"
(Command) "echo foo; echo bar; echo baz"
(Input) "echo"
(Command) "echo"
Action args:
0. command(The default is your input)
1. if it is "async", the command is executed
asynchronously
execute_system *defx-action-execute_system*
Execute the file by system associated command.
link *defx-action-link*
Create symbolic/hard link files for the selected files to defx
clipboard.
Note: If you want to execute it in Windows, you need to have
symbolic link permission.
Action args:
0. create link mode
"hard": Create hard link.
"relative": Create relative symbolic link from
selected files.
Otherwise: Create symbolic link.
move *defx-action-move*
Move the selected files to defx clipboard.
multi *defx-action-multi*
Multiple actions.
Action args:
0. action 1
1. action 2
...
Example: >
" auto quit like behavior
nnoremap <silent><buffer><expr> <CR>
\ defx#do_action('multi', ['drop', 'quit'])
nnoremap <silent><buffer><expr> s
\ defx#do_action('multi', [['drop', 'split'], 'quit'])
new_directory *defx-action-new_directory*
Create a new directory.
Action args:
0. options. The supported values are:
"open":
open created directory.
1. open command(The default is |:edit|)
Note: if the command is "open_tree",
|defx-action-open_tree| is used.
new_file *defx-action-new_file*
Create a new file and directory if provided.
If the input ends with "/", it means new directory.
Action args:
0. options. The supported values are:
"open":
open created file.
1. open command(The default is |:edit|)
*defx-action-new_multiple_files*
new_multiple_files
Create new files and directories if provided.
If the input ends with "/", it means new directory.
Action args:
0. options. The supported values are:
"open":
open created file or directory.
1. open command(The default is |:edit|)
Note: if the command is "open_tree",
|defx-action-open_tree| is used.
open *defx-action-open*
Open the selected candidates in the current window.
Note: If the candidate is directory, it is same with
|defx-action-open_directory|.
Action args:
0. open command(The default is |:edit|)
Note: if the command is "choose", it use
"vim-choosewin" plugin as window selector.
https://github.com/t9md/vim-choosewin
open_directory *defx-action-open_directory*
Open the directory.
Action args:
0. open file path(The default is the selected
directory)
open_or_close_tree *defx-action-open_or_close_tree*
It is the same with |defx-action-open_tree| with "toggle"
arg.
Note: The action is deprecated.
open_tree *defx-action-open_tree*
Open the directory tree.
Action args:
0-n. options. The supported values are:
"nested":
enable nested directory view if it has one
directory only.
"recursive":
open the directory tree recursively.
"recursive[:{level}]":
open the directory tree recursively by
max recursive {level}.
"toggle":
close the directory tree if the directory is
opened.
open_tree_recursive *defx-action-open_tree_recursive*
It is the same with |defx-action-open_tree| with "recursive"
arg.
Note: The action is deprecated.
paste *defx-action-paste*
Fire the clipboard action in the current directory.
Note: It is used after |defx-action-copy| or
|defx-action-move|.
preview *defx-action-preview*
Preview the file. Close the preview window if it is already
exists.
Note: "ueberzug" and "bash" commands are needed to preview
image files.
https://pypi.org/project/ueberzug/
Note: The image preview is for X11 only.
print *defx-action-print*
Print the filename.
quit *defx-action-quit*
Quit the buffer.
redraw *defx-action-redraw*
Redraw the buffer.
remove *defx-action-remove*
Delete the file/directory under cursor or from selected list
completely.
Note: You cannot undo the action.
Action args:
0. If it is "true", suppress the confirmation.
remove_trash *defx-action-remove_trash*
Delete the file/directory under cursor or from selected list
to trashbox.
Note: Send2Trash module is needed for the action.
https://pypi.org/project/Send2Trash/
Action args:
0. If it is "true", suppress the confirmation.
rename *defx-action-rename*
Rename the file/directory under cursor or from selected list.
Note: If you select multiple files, it will be buffer-rename
mode.
Action args:
0. rename mode
"insert": Cursor move to before file name.
"append": Cursor move to before file suffix.
"new": Input new file name.
Otherwise: Cursor move to end of file name.
repeat *defx-action-repeat*
Redraw the previous action.
resize *defx-action-resize*
Vertical resize and redraw the current window.
Action args:
0. Resized window size.
search *defx-action-search*
Search the path.
Note: If the path is not absolute path, current directory
relative path is used instead.
Action args:
0. search the path
search_recursive *defx-action-search_recursive*
Search the path recursively.
Note: If the path is not absolute path, current directory
relative path is used instead.
Note: If the path is not found in the current directory, cd to
the path.
Action args:
0. search the path
toggle_columns *defx-action-toggle_columns*
Toggle the current columns.
Action args:
0. ":" separated defx columns.
toggle_sort *defx-action-toggle_sort*
Toggle the sort method.
Action args:
0. sort method.
toggle_ignored_files *defx-action-toggle_ignored_files*
Toggle the enable state of ignored files.
toggle_select *defx-action-toggle_select*
Toggle the cursor candidate select.
toggle_select_all *defx-action-toggle_select_all*
Toggle the all candidates select.
toggle_select_visual *defx-action-toggle_select_visual*
Toggle the visual mode selected candidates select.
yank_path *defx-action-yank_path*
Yank the all candidates path.
Action args:
0. |fnamemodify()| modifier(The default is "")
------------------------------------------------------------------------------
OPTIONS *defx-options*
*defx-option-no-*
-no-{option-name}
Disable {option-name} flag.
Note: If you use both {option-name} and -no-{option-name} in
the same defx buffer, it is undefined.
*defx-option-auto-cd*
-auto-cd
Change the working directory while navigating with defx.
Note: It changes global current directory if the window has
not local current directory. If you don't like the behavior,
you need to set local current directory.
Default: false
*defx-option-auto-recursive-level*
-auto-recursive-level={level}
The level to expand tree automatically.
Default: 0
*defx-option-buffer-name*
-buffer-name={buffer-name}
Specify defx buffer name.
Default: "default"
*defx-option-close*
-close
Close defx buffer window.
Default: false
*defx-option-columns*
-columns={columns1:columns2,...}
Specify defx columns.
Default: "mark:indent:icon:filename:type"
*defx-option-direction*
-direction={direction}
Specify the window direction as {direction} if
|defx-option-split| is set.
You can use "topleft" or "botright".
Default: ""
*defx-option-focus*
-focus
Focus on the defx buffer after opening a defx buffer.
Default: true
*defx-option-filtered-files*
-filtered-files={pattern}
Specify the filtered files pattern.
The pattern is comma separated.
Default: ""
*defx-option-floating-preview*
-floating-preview
Open the preview window in floating window when
|defx-option-vertical-preview|.
Note: To use it, you need to use neovim
0.4.0+(|nvim_open_win()|).
Note: If you need the feature in Vim8, you should use
|preview-popup| instead.
Default: false
*defx-option-ignored-files*
-ignored-files={pattern}
Specify the ignored files pattern.
The pattern is comma separated.
Default: ".*"
*defx-option-ignored-recursive-files*
-ignored-recursive-files={pattern}
Specify the ignored files pattern when
|defx-action-open_tree_recursive|.
The pattern is comma separated.
Default: ""
*defx-option-listed*
-listed
Enable 'buflisted' option in defx buffer.
Default: false
*defx-option-new*
-new
Create new defx buffer.
Default: false
*defx-option-preview-height*
-preview-height={preview-height}
Specify the preview window height.
Default: 'previewheight'
*defx-option-preview-width*
-preview-width={preview-width}
Specify the preview width when
|defx-option-vertical-preview|.
Default: 40
*defx-option-post-action*
-post-action={action}
Specify the action after action.
"jump": move to defx window.
Otherwise: nothing.
Default: "none"
*defx-option-profile*
-profile
Enable profile feature.
Note: It is for debugging.
Default: false
*defx-option-resume*
-resume
Resume existing defx buffer.
Note: |defx-option-listed| is needed to resume.
Default: false
*defx-option-root-marker*
-root-marker={marker}
Root marker.
Default: "[in] "
*defx-option-search*
-search={path}
Do |defx-action-search| the {path}.
Default: ""
*defx-option-search-recursive*
-search-recursive={path}
Do |defx-action-search_recursive| the {path}.
Default: ""
*defx-option-session-file*
-session-file={path}
Session file {path}.
Note: It must be full path.
Default: ""
*defx-option-show-ignored-files*
-show-ignored-files
Show ignored files by default.
Default: false
*defx-option-show-parent*
-show-parent
Show ../ parent directory in the buffer.
Default: false
*defx-options-sort*
-sort={method}
Sort method.
If the method is upper case, the order will be reversed.
You can sort by multiple keys by ":"(e.g.
-sort=extension:filename).
"extension": file extension sort
"filename": file name sort
"size": file size sort
"time": file modified time sort
Default: "filename"
*defx-option-split*
-split={direction}
Specify the split direction.
"vertical": Split buffer vertically
"horizontal": Split buffer horizontally
"no": No split
"tab": Create the new tab
"floating": Use neovim floating window feature
Default: "no"
*defx-option-toggle*
-toggle
Close defx buffer window if this defx window exists.
Default: false
*defx-option-vertical-preview*
-vertical-preview
Open the preview window vertically.
Default: false
*defx-option-wincol*
-wincol={window-column}
Set the column position of the Defx window if
|defx-option-split| is "floating".
Default: &columns / 4
*defx-option-winheight*
-winheight={window-height}
Set the height of the window if |defx-option-split| is
"horizontal".
Default: 30
*defx-option-winrelative*
-winrelative={direction}
Specify the relative position in floating window.
|nvim_open_win()|
Default: "editor"
*defx-option-winrow*
-winrow={window-row}
Set the row position of the Defx window if
|defx-option-split| is "floating".
Default: &lines / 3
*defx-option-winwidth*
-winwidth={window-width}
Set the width of the window if |defx-option-split| is
"vertical".
Default: 90
*defx-option-winborder*
-winborder={window-border}
Set the border of the window if |defx-option-split| is
"floating".
Default: "none"
------------------------------------------------------------------------------
COLUMNS *defx-columns*
*defx-column-filename*
filename File name.
Note: The column length is expanded to display all filenames
automatically.
variables:
min_width the minimum width of the column
(default: 40)
max_width the maximum width of the column
Negative value sets width exactly to:
"winwidth - (-max_width)".
Example: "-36" max_width means width
is "winwidth - 36".
(default: 100)
max_width_percent
the maximum width in percentage of a defx
buffer
It means: "winwidth * max_width_percent /
100".
Example: "120" max_width_percent means 120
percent winwidth.
(default: 0)
root_marker_highlight
the root marker highlight
(default: "Constant")
*defx-column-icon*
icon Basic icon.
Note: The padding is not added automatically.
variables:
directory_icon the closed directory icon
(default: "+")
file_icon the normal file icon
(default: " ")
opened_icon the opened directory icon
(default: "-")
root_icon the root directory icon
(default: " ")
*defx-column-indent*
indent Tree indentation.
Note: It depends on |defx-column-filename|.
variables:
indent the indent marker.
(default: " ")
*defx-column-mark*
mark File selected mark.
variables:
length the column length
(default: 1)
readonly_icon the readonly file icon
(default: "X")
selected_icon the selected file icon
(default: "*")
*defx-column-size*
size File size.
*defx-column-space*
space One space column for padding.
*defx-column-time*
time File modified time.
variables:
format the time format
(default: "%y.%m.%d %H:%M")
*defx-column-type*
type File type.
variables:
types the types definition
(default: complicated)
EXTERNAL COLUMNS *defx-external-columns*
git Git status.
https://github.com/kristijanhusak/defx-git
icons Nerd font icons.
https://github.com/kristijanhusak/defx-icons
------------------------------------------------------------------------------
SOURCES *defx-sources*
file File
variables:
root root function name
Note: It must be string. You cannot use
|Funcref| or |lambda|.
(default is v:null)
==============================================================================
DENITE SOURCES *defx-denite-sources*
*denite-source-defx/drive*
defx/drive Gather defx drives.
Note: You can set drives like this:
>
call defx#custom#option('_', 'drives', [
\ expand('~/Downloads'), expand('~')
\ ])
<
*denite-source-defx/history*
defx/history Gather defx histories.
*denite-source-defx/session*
defx/session Gather defx sessions.
==============================================================================
EXAMPLES *defx-examples*
>
autocmd FileType defx call s:defx_my_settings()
function! s:defx_my_settings() abort
" Define mappings
nnoremap <silent><buffer><expr> <CR>
\ defx#do_action('open')
nnoremap <silent><buffer><expr> c
\ defx#do_action('copy')
nnoremap <silent><buffer><expr> m
\ defx#do_action('move')
nnoremap <silent><buffer><expr> p
\ defx#do_action('paste')
nnoremap <silent><buffer><expr> l
\ defx#do_action('open')
nnoremap <silent><buffer><expr> E
\ defx#do_action('open', 'vsplit')
nnoremap <silent><buffer><expr> P
\ defx#do_action('preview')
nnoremap <silent><buffer><expr> o
\ defx#do_action('open_tree', 'toggle')
nnoremap <silent><buffer><expr> K
\ defx#do_action('new_directory')
nnoremap <silent><buffer><expr> N
\ defx#do_action('new_file')
nnoremap <silent><buffer><expr> M
\ defx#do_action('new_multiple_files')
nnoremap <silent><buffer><expr> C
\ defx#do_action('toggle_columns',
\ 'mark:indent:icon:filename:type:size:time')
nnoremap <silent><buffer><expr> S
\ defx#do_action('toggle_sort', 'time')
nnoremap <silent><buffer><expr> d
\ defx#do_action('remove')
nnoremap <silent><buffer><expr> r
\ defx#do_action('rename')
nnoremap <silent><buffer><expr> !
\ defx#do_action('execute_command')
nnoremap <silent><buffer><expr> x
\ defx#do_action('execute_system')
nnoremap <silent><buffer><expr> yy
\ defx#do_action('yank_path')
nnoremap <silent><buffer><expr> .
\ defx#do_action('toggle_ignored_files')
nnoremap <silent><buffer><expr> ;
\ defx#do_action('repeat')
nnoremap <silent><buffer><expr> h
\ defx#do_action('cd', ['..'])
nnoremap <silent><buffer><expr> ~
\ defx#do_action('cd')
nnoremap <silent><buffer><expr> q
\ defx#do_action('quit')
nnoremap <silent><buffer><expr> <Space>
\ defx#do_action('toggle_select') . 'j'
nnoremap <silent><buffer><expr> *
\ defx#do_action('toggle_select_all')
nnoremap <silent><buffer><expr> j
\ line('.') == line('$') ? 'gg' : 'j'
nnoremap <silent><buffer><expr> k
\ line('.') == 1 ? 'G' : 'k'
nnoremap <silent><buffer><expr> <C-l>
\ defx#do_action('redraw')
nnoremap <silent><buffer><expr> <C-g>
\ defx#do_action('print')
nnoremap <silent><buffer><expr> cd
\ defx#do_action('change_vim_cwd')
endfunction
<
==============================================================================
FREQUENTLY ASKED QUESTIONS (FAQ) *defx-faq*
Q: How to donate money to you?
A: I have started github sponsorship to spend more time for Vim/neovim
plugins. You can donate money to help me!
https://github.com/sponsors/Shougo
Q: I want to explore the folder where the current file is.
A: >
Defx `escape(expand('%:p:h'), ' :')` -search=`expand('%:p')`
Q: I want to open defx window like explorer.
A: >
Defx -split=vertical -winwidth=50 -direction=topleft
Q: I want to open file like vimfiler explorer mode.