Skip to content

Commit

Permalink
[docgen] Update docs
Browse files Browse the repository at this point in the history
skip-checks: true
  • Loading branch information
Github Actions committed Nov 21, 2024
1 parent 81cc9c3 commit bf81e2a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ Note that at the moment the ssh adapter does not support Windows machines, and i
- [open_float(dir)](doc/api.md#open_floatdir)
- [toggle_float(dir)](doc/api.md#toggle_floatdir)
- [open(dir)](doc/api.md#opendir)
- [close()](doc/api.md#close)
- [close(opts)](doc/api.md#closeopts)
- [open_preview(opts, callback)](doc/api.md#open_previewopts-callback)
- [select(opts, callback)](doc/api.md#selectopts-callback)
- [save(opts, cb)](doc/api.md#saveopts-cb)
Expand Down
10 changes: 7 additions & 3 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
- [open_float(dir)](#open_floatdir)
- [toggle_float(dir)](#toggle_floatdir)
- [open(dir)](#opendir)
- [close()](#close)
- [close(opts)](#closeopts)
- [open_preview(opts, callback)](#open_previewopts-callback)
- [select(opts, callback)](#selectopts-callback)
- [save(opts, cb)](#saveopts-cb)
Expand Down Expand Up @@ -119,11 +119,15 @@ Open oil browser for a directory
| ----- | ------------- | ------------------------------------------------------------------------------------------- |
| dir | `nil\|string` | When nil, open the parent of the current buffer, or the cwd if current buffer is not a file |

## close()
## close(opts)

`close()` \
`close(opts)` \
Restore the buffer that was present when oil was opened

| Param | Type | Desc |
| ----------------- | -------------------- | --------------------------------------------------- |
| opts | `nil\|oil.CloseOpts` | |
| >exit_if_last_buf | `nil\|boolean` | Exit vim if this oil buffer is the last open buffer |

## open_preview(opts, callback)

Expand Down
9 changes: 8 additions & 1 deletion doc/oil.txt
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,13 @@ open({dir}) *oil.ope
{dir} `nil|string` When nil, open the parent of the current buffer, or the
cwd if current buffer is not a file

close() *oil.close*
close({opts}) *oil.close*
Restore the buffer that was present when oil was opened

Parameters:
{opts} `nil|oil.CloseOpts`
{exit_if_last_buf} `nil|boolean` Exit vim if this oil buffer is the
last open buffer

open_preview({opts}, {callback}) *oil.open_preview*
Preview the entry under the cursor in a split
Expand Down Expand Up @@ -513,6 +517,9 @@ change_sort *actions.change_sor
close *actions.close*
Close oil and restore original buffer

Parameters:
{exit_if_last_buf} `boolean` Exit vim if oil is closed as the last buffer

open_cmdline *actions.open_cmdline*
Open vim cmdline with current entry as an argument

Expand Down

0 comments on commit bf81e2a

Please sign in to comment.