diff --git a/README.md b/README.md index 8e0dba0..bf12bed 100644 --- a/README.md +++ b/README.md @@ -394,7 +394,7 @@ These are plugins maintained by other authors that extend the functionality of o - [toggle_hidden()](doc/api.md#toggle_hidden) - [get_current_dir(bufnr)](doc/api.md#get_current_dirbufnr) - [open_float(dir, opts, cb)](doc/api.md#open_floatdir-opts-cb) -- [toggle_float(dir, opts, cb)](doc/api.md#toggle_floatdir) +- [toggle_float(dir, opts, cb)](doc/api.md#toggle_floatdir-opts-cb) - [open(dir, opts, cb)](doc/api.md#opendir-opts-cb) - [close(opts)](doc/api.md#closeopts) - [open_preview(opts, callback)](doc/api.md#open_previewopts-callback) diff --git a/doc/api.md b/doc/api.md index 7a10791..24d4a50 100644 --- a/doc/api.md +++ b/doc/api.md @@ -11,7 +11,7 @@ - [toggle_hidden()](#toggle_hidden) - [get_current_dir(bufnr)](#get_current_dirbufnr) - [open_float(dir, opts, cb)](#open_floatdir-opts-cb) -- [toggle_float(dir, opts, cb)](#toggle_floatdir) +- [toggle_float(dir, opts, cb)](#toggle_floatdir-opts-cb) - [open(dir, opts, cb)](#opendir-opts-cb) - [close(opts)](#closeopts) - [open_preview(opts, callback)](#open_previewopts-callback) @@ -110,8 +110,7 @@ Open oil browser in a floating window ## toggle_float(dir, opts, cb) `toggle_float(dir, opts, cb)` \ -Open oil browser in a floating window, or close it if open. Parameters only apply when the floating window is -opened +Open oil browser in a floating window, or close it if open | Param | Type | Desc | | ------------ | ------------------------------------------------------- | ------------------------------------------------------------------------------------------- | diff --git a/doc/oil.txt b/doc/oil.txt index 7738156..8753f87 100644 --- a/doc/oil.txt +++ b/doc/oil.txt @@ -321,12 +321,20 @@ open_float({dir}, {opts}, {cb}) *oil.open_floa plit modifier {cb} `nil|fun()` Called after the oil buffer is ready -toggle_float({dir}) *oil.toggle_float* +toggle_float({dir}, {opts}, {cb}) *oil.toggle_float* Open oil browser in a floating window, or close it if open Parameters: - {dir} `nil|string` When nil, open the parent of the current buffer, or the - cwd if current buffer is not a file + {dir} `nil|string` When nil, open the parent of the current buffer, or + the cwd if current buffer is not a file + {opts} `nil|oil.OpenOpts` + {preview} `nil|oil.OpenPreviewOpts` When present, open the preview + window after opening oil + {vertical} `nil|boolean` Open the buffer in a vertical split + {horizontal} `nil|boolean` Open the buffer in a horizontal split + {split} `nil|"aboveleft"|"belowright"|"topleft"|"botright"` S + plit modifier + {cb} `nil|fun()` Called after the oil buffer is ready open({dir}, {opts}, {cb}) *oil.open* Open oil browser for a directory