You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -346,10 +346,18 @@ Preview window is used to replace traditional `pedit` command and can be used to
346
346
You can open the preview window by:
347
347
348
348
```VimL
349
-
quickui#preview#open(filename, lnum)
349
+
quickui#preview#open(filename, opts)
350
350
```
351
351
352
-
It will not interfere your work, and will immediately close if you move your cursor around. The second parameter `lnum` is a line number, and if you set it above zero, the certain line in the source will be highlighted.
352
+
It will not interfere your work, and will immediately close if you move your cursor around. The second parameter `opts` is a dictionary with options, available options are:
353
+
354
+
| Option | Type | Default | Description |
355
+
|-|-|-|-|
356
+
| cursor | Number | -1 | if you set it above zero, the certain line will be highlighted (use cursorline). |
357
+
| number | Number | 1 | set to zero to disable line number |
| title | String |`unset`| additional title for preview window |
360
+
| persist | Number | 0 | By default the preview window will be closed automatically when `CursorMove` happens, set to 1 to close it manually by `quickui#preview#close()`|
353
361
354
362
Usually the syntax highlighting and cursorline will help you when you are using it to peek symbol definitions.
0 commit comments