From 8cb59e6fcac3dce8dfa44b678fdc94cf81efa11b Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 19 Aug 2024 20:51:08 +0900 Subject: [vim] Add 'exit' callback A spec can have `exit` callback that is called with the exit status of fzf. This can be used to clean up temporary resources or restore the original state when fzf is closed without a selection. --- README-VIM.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'README-VIM.md') diff --git a/README-VIM.md b/README-VIM.md index e727dd1e..3362ea26 100644 --- a/README-VIM.md +++ b/README-VIM.md @@ -289,8 +289,9 @@ The following table summarizes the available options. | `source` | string | External command to generate input to fzf (e.g. `find .`) | | `source` | list | Vim list as input to fzf | | `sink` | string | Vim command to handle the selected item (e.g. `e`, `tabe`) | -| `sink` | funcref | Reference to function to process each selected item | +| `sink` | funcref | Function to be called with each selected item | | `sinklist` (or `sink*`) | funcref | Similar to `sink`, but takes the list of output lines at once | +| `exit` | funcref | Function to be called with the exit status of fzf (e.g. 0, 1, 2, 130) | | `options` | string/list | Options to fzf | | `dir` | string | Working directory | | `up`/`down`/`left`/`right` | number/string | (Layout) Window position and size (e.g. `20`, `50%`) | -- cgit v1.2.3