-
-
Notifications
You must be signed in to change notification settings - Fork 15
/
deol.txt
463 lines (349 loc) · 15.4 KB
/
deol.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
*deol.txt* Dark powered shell interface.
Version: 3.0
Author: Shougo <Shougo.Matsu at gmail.com>
License: MIT license
CONTENTS *deol-contents*
Introduction |deol-introduction|
Usage |deol-usage|
Install |deol-install|
Examples |deol-examples|
Interface |deol-interface|
Functions |deol-functions|
Options |deol-options|
Key mappings |deol-key-mappings|
Ddu Sources |deol-ddu-sources|
FAQ |deol-faq|
Compatibility |deol-compatibility|
==============================================================================
INTRODUCTION *deol-introduction*
*deol* is a dark powered shell both for NeoVim and Vim. It is based on
NeoVim or Vim terminal feature.
==============================================================================
USAGE *deol-usage*
==============================================================================
INSTALL *deol-install*
deol requires NeoVim 0.8.0 or Vim 8.2.1978+.
==============================================================================
EXAMPLES *deol-examples*
>
autocmd FileType deol call s:deol_settings()
function! s:deol_settings()
nnoremap <buffer> <C-n> <Plug>(deol_next_prompt)
nnoremap <buffer> <C-p> <Plug>(deol_previous_prompt)
nnoremap <buffer> <CR> <Plug>(deol_execute_line)
nnoremap <buffer> A <Plug>(deol_start_append_last)
nnoremap <buffer> I <Plug>(deol_start_insert_first)
nnoremap <buffer> a <Plug>(deol_start_append)
nnoremap <buffer> e <Plug>(deol_edit)
nnoremap <buffer> i <Plug>(deol_start_insert)
nnoremap <buffer> q <Plug>(deol_quit)
endfunction
autocmd BufEnter deol-edit@default call s:deol_edit_settings()
function! s:deol_edit_settings()
nnoremap <buffer> <CR> <Plug>(deol_execute_line)
nnoremap <buffer> <BS> <Plug>(deol_backspace)
nnoremap <buffer> <C-h> <Plug>(deol_backspace)
nnoremap <buffer> q <Plug>(deol_quit)
nnoremap <buffer> <C-c> <Plug>(deol_ctrl_c)
inoremap <buffer> <CR> <Plug>(deol_execute_line)
inoremap <buffer> <BS> <Plug>(deol_backspace)
inoremap <buffer> <C-h> <Plug>(deol_backspace)
inoremap <buffer> <C-c> <Plug>(deol_ctrl_c)
inoremap <buffer> <C-d> <Plug>(deol_ctrl_d)
endfunction
<
==============================================================================
INTERFACE *deol-interface*
------------------------------------------------------------------------------
FUNCTIONS *deol-functions*
*deol#cd()*
deol#cd({directory})
Change the deol buffer directory to {directory}.
*deol#edit()*
deol#edit()
Open a deol edit buffer.
You can edit and execute the deol command line in the buffer.
Special commands in edit buffer:
":{command}" Execute as Vim Ex-command
"cd {path}" |:lcd| to {path} if |deol-option-auto_cd| is
enabled
"vim {path}" Quit deol buffer and |:edit| {path}
*deol#set_local_option()*
deol#set_local_option({name}, {option-name}, {value})
deol#set_local_option({name}, {dict})
Set {option-name} option to {value} for {name}.
If {dict} is available, the key is {option-name} and the value
is {value}. See |deol-options| for available {option-name}.
*deol#set_option()*
deol#set_option({option-name}, {value})
deol#set_option({dict})
Set {option-name} option to {value}.
If {dict} is available, the key is {option-name} and the value
is {value}. See |deol-options| for available {option-name}.
*deol#start()*
deol#start([{options}])
Create a deol buffer.
{options} is |deol-options| dictionary.
If another deol buffer exists in the current tab, it will
switch to the buffer.
If |deol-option-command| is omit, 'shell' is used.
------------------------------------------------------------------------------
OPTIONS *deol-options*
*deol-option-auto_cd*
auto_cd
Follow cd command in shell
NOTE: It is only available for deol edit buffer.
Default: v:true
*deol-option-command*
command
Shell command line.
Default: [&shell]
*deol-option-cwd*
cwd
Current directory.
Default: Use |getcwd()| value
*deol-option-dir_changed*
dir_changed
Follow |DirChanged| event.
Default: v:true
*deol-option-edit*
edit
Open edit buffer in default.
Default: v:false
*deol-option-edit_filetype*
edit_filetype
Specify 'filetype' in edit buffer.
*deol-option-edit_winheight*
edit_winheight
Set the height of the deol edit window.
Default: 1
*deol-option-external_history_path*
external_history_path
The external shell history path. If it is set, the external
histories are loaded in deol edit buffer.
Default: ""
*deol-option-extra_term_options*
extra_term_options
Set the extra options for gvim terminal. See |term_start()|.
`b:deol_extra_term_options` can override it in a buffer.
NOTE: It is available in Vim only.
>
call deol#set_option('extra_term_options', #{
\ term_finish: 'close',
\ })
<
Default: #{
\ curwin: v:true,
\ term_kill: "kill",
\ exit_cb: { job, status -> execute("unlet! t:deol") },
\ }
*deol-option-floating_border*
floating_border
The border if |deol-option-split| is "floating".
Please see |nvim_open_win()| for available options.
Default: "none"
*deol-option-internal_history_path*
internal_history_path
The internal shell history path. If it is set, the internal
histories are saved.
Default: ""
*deol-option-name*
name (string)
Specify the name.
Default: "default"
*deol-option-nvim_server*
nvim_server
The path of NeoVim server.
Please see |client-server|.
NOTE: It is NeoVim only.
Default: ""
*deol-option-prompt_pattern*
prompt_pattern
Sets the pattern which matches the shell prompt.
NOTE: The right prompt is not supported.
Default: "" ('\f\+>' for Windows)
*deol-option-shell_history_max*
shell_history_max
The max history of external shell history.
NOTE: It is only used when |deol-option-external_history_path|
or |deol-option-internal_history_path| is set.
Default: 500
*deol-option-split*
split
Specify the split direction.
"": No split
"floating": Use NeoVim floating window feature
"vertical": Split buffer vertically
"farleft": Split buffer far left, like |CTRL-W_H|
"farright": Split buffer far right, like |CTRL-W_L|
otherwise: Split buffer horizontally
Default: ""
*deol-option-start_insert*
start_insert
Start the insert mode in deol buffer.
NOTE: In Vim, the option is ignored if new terminal buffer is
created.
Default: v:true
*deol-option-toggle*
toggle
Close deol buffer window if this deol window exists.
Default: v:false
*deol-option-wincol*
wincol
Set the column of the Deol window if |deol-option-split| is
"floating".
Default: &columns / 4
*deol-option-winheight*
winheight
Set the height of the Deol window if |deol-option-split|
is "horizontal".
if |deol-option-split| is "floating", set the height of the
floating window.
Default: 15
*deol-option-winrow*
winrow
Set the row of the Deol window if |deol-option-split| is
"floating".
Default: &lines / 3
*deol-option-winwidth*
winwidth
Set the width of the Deol window if |deol-option-split|
is "vertical".
if |deol-option-split| is "floating", set the width of the
floating window.
Default: 80
------------------------------------------------------------------------------
KEY MAPPINGS *deol-key-mappings*
*<Plug>(deol_backspace)*
<Plug>(deol_backspace)
Send backspace key.
NOTE: It is available in deol edit buffer.
*<Plug>(deol_bg)*
<Plug>(deol_bg)
Create new deol buffer instead.
NOTE: It is available in deol buffer.
*<Plug>(deol_ctrl_c)*
<Plug>(deol_ctrl_c)
Same as shell's CTRL-c; send an INT signal
NOTE: It is available in deol edit buffer.
*<Plug>(deol_ctrl_d)*
<Plug>(deol_ctrl_d)
Same as shell's CTRL-d; send an EOF
NOTE: It is available in deol edit buffer.
*<Plug>(deol_edit)*
<Plug>(deol_edit)
Open the edit buffer.
NOTE: |deol-option-prompt_pattern| must be set.
NOTE: It is available in deol buffer.
*<Plug>(deol_execute_line)*
<Plug>(deol_execute_line)
Execute the command line.
NOTE: |deol-option-prompt_pattern| must be set.
*<Plug>(deol_next_prompt)*
<Plug>(deol_next_prompt)
Move to next prompt from cursor.
NOTE: |deol-option-prompt_pattern| must be set.
NOTE: It is available in deol buffer.
*<Plug>(deol_paste_prompt)*
<Plug>(deol_paste_prompt)
Paste the history to the command line.
NOTE: |deol-option-prompt_pattern| must be set.
NOTE: It is available in deol buffer.
*<Plug>(deol_previous_prompt)*
<Plug>(deol_previous_prompt)
Move to previous prompt from cursor.
NOTE: |deol-option-prompt_pattern| must be set.
NOTE: It is available in deol buffer.
*<Plug>(deol_quit)*
<Plug>(deol_quit)
Quit the deol window.
*<Plug>(deol_start_insert)*
<Plug>(deol_start_insert)
Start insert mode.
NOTE: It is available in deol buffer.
*<Plug>(deol_start_insert_first)*
<Plug>(deol_start_insert_first)
Start insert mode and move the cursor to the first column.
NOTE: It is available in deol buffer.
*<Plug>(deol_start_append)*
<Plug>(deol_start_append)
Start insert mode and move the cursor to the next column.
NOTE: It is available in deol buffer.
*<Plug>(deol_start_append_last)*
<Plug>(deol_start_append_last)
Start insert mode and move the cursor to the last column.
NOTE: It is available in deol buffer.
==============================================================================
DDU SOURCES *deol-ddu-sources*
*deol-source-deol*
deol Gather deol tabs.
==============================================================================
FAQ *deol-faq*
FAQ 1: |deol-faq-1|
How to donate money to you?
FAQ 2: |deol-faq-2|
What is the difference neoterm and deol.nvim?
FAQ 3: |deol-faq-3|
How to exit terminal mode in deol buffer?
FAQ 4: |deol-faq-4|
I want to start Deol in the directory where the current buffer belongs
to.
FAQ 5: |deol-faq-5|
I want to use current vim when "git commit".
FAQ 6: |deol-faq-6|
How to enable shell history completion in ddc.vim?
FAQ 7: |deol-faq-7|
I want to cd automatically when Vim current directory is changed.
------------------------------------------------------------------------------
*deol-faq-1*
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
*deol-faq-2*
Q: What is the difference neoterm and deol.nvim?
A: neoterm is specialized for interpreter execution in the buffer.
deol.nvim is specialized for shell environment in each tab.
*deol-faq-3*
Q: How to exit terminal mode in deol buffer?
A: Press |CTRL-\_CTRL-N| key, or use <ESC> key with the following key mapping.
>
tnoremap <ESC> <C-\><C-n>
<
*deol-faq-4*
Q: I want to start Deol in the directory where the current buffer belongs to.
A: >
call deol#start(#{ cwd: '%'->expand()->fnamemodify(':h') })
<
*deol-faq-5*
Q: I want to use current vim when "git commit".
A: You should install "guise" plugin for it.
https://github.com/lambdalisue/guise.vim
*deol-faq-6*
Q. How to enable shell history completion in ddc.vim?
A. >
call ddc#custom#patch_filetype(['deol'], 'sources', ['shell-history'])
call ddc#custom#patch_global('sourceOptions', #{
\ _: #{
\ matchers: ['matcher_head'],
\ sorters: ['sorter_rank']
\ },
\ shell-history: {'mark': 'shell'},
\ })
<
*deol-faq-7*
Q. I want to cd automatically when Vim current directory is changed.
A. >
autocmd DirChanged <buffer>
\ call deol#cd(v:event->get('cwd', getcwd()))
<
==============================================================================
COMPATIBILITY *deol-compatibility*
2024.06.14
* Remove custom_map option and default mappings. You should set them
manually.
2023.06.11
* Remove g:deol#enable_dir_changed. Please use |DirChanged| autocmd instead.
* Remove all variables. Please use |deol-options| instead.
==============================================================================
vim:tw=78:ts=8:ft=help:norl:noet:fen: