Skip to content

Commit de10502

Browse files
author
skywind3000
committed
update doc with previewer
1 parent 23a7fa6 commit de10502

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Trying to share my configuration to my friends, I found that they did't have pat
2929
- [Listbox](#listbox)
3030
- [Context menu](#context-menu)
3131
- [Textbox](#textbox)
32+
- [Preview window](#preview-window)
3233
- [Tools](#tools)
3334
- [Buffer switcher](#buffer-switcher)
3435
- [Function list](#function-list)
@@ -333,6 +334,21 @@ This function can display vim error messages (`:messages`) in the text window:
333334

334335
Navigating the messages with `HJKL` or `PageUp/PageDown` is much handy than list them in the command line by `:messages`.
335336

337+
### Preview window
338+
339+
Preview window is used to replace traditional `pedit` command and can be used to display certain file in a small popup window around your cursor:
340+
341+
![](images/preview.png)
342+
343+
You can open the preview window by:
344+
345+
```VimL
346+
quickui#preview#open(filename, lnum)
347+
```
348+
349+
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.
350+
351+
Usually the syntax highlighting and cursorline will help you when you are using it to peek symbol definitions.
336352

337353
## Tools
338354

images/preview.png

33.9 KB
Loading

0 commit comments

Comments
 (0)