Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions MANUAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

QuickUI is fully customizable, and can be easily configurated.

# Content
# Content

<!-- TOC -->

Expand Down Expand Up @@ -252,7 +252,9 @@ open the context menu:
quickui#context#open(content, opts)
```

Parameter `content` is a list of `[text, command]` items. `opts` is a dictionary of options, has similar options in `listbox`.
Parameter `content` is a list of `[text, command]` items. `opts` is a dictionary of options, has similar options in `listbox` but an additional option:

- `ignore_case`: ignore case of the keyword, default 1.

**Sample code**:

Expand Down Expand Up @@ -404,8 +406,8 @@ There is a builtin buffer switcher using `listbox`, open it by:

call quickui#tools#list_buffer('e')

or
or

call quickui#tools#list_buffer('tabedit')

Then `hjkl` to navigate, `enter`/`space` to switch buffer and `ESC`/`CTRL+[` to quit:
Expand Down Expand Up @@ -550,4 +552,3 @@ It is time for me to bring these ideas to reality, just start from this plugin.
## Credit

like vim-quickui? Follow the repository on [GitHub](https://github.com/skywind3000/vim-quickui) and vote for it on [vim.org](https://www.vim.org/scripts/script.php?script_id=5845). And if you're feeling especially charitable, follow skywind3000 on [Twitter](https://twitter.com/skywind3000) and [GitHub](https://github.com/skywind3000).

5 changes: 3 additions & 2 deletions autoload/quickui/context.vim
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function! s:vim_create_context(textlist, opts)
let hwnd.hotkey = {}
for item in hwnd.items
if item.enable != 0 && item.key_pos >= 0
let key = tolower(item.key_char)
let key = ignore_case ? tolower(item.key_char) : item.key_char
if get(a:opts, 'reserve', 0) == 0
let hwnd.hotkey[key] = item.index
elseif get(g:, 'quickui_protect_hjkl', 0) != 0
Expand Down Expand Up @@ -491,6 +491,7 @@ endfunc
"----------------------------------------------------------------------
function! s:nvim_create_context(textlist, opts)
let border = get(a:opts, 'border', g:quickui#style#border)
let ignore_case = get(a:opts, 'ignore_case', 1)
let hwnd = quickui#context#compile(a:textlist, border)
let bid = quickui#core#scratch_buffer('context', hwnd.image)
let hwnd.bid = bid
Expand Down Expand Up @@ -519,7 +520,7 @@ function! s:nvim_create_context(textlist, opts)
let hwnd.hotkey = {}
for item in hwnd.items
if item.enable != 0 && item.key_pos >= 0
let key = tolower(item.key_char)
let key = ignore_case ? tolower(item.key_char) : item.key_char
if get(a:opts, 'reserve', 0) == 0
let hwnd.hotkey[key] = item.index
elseif get(g:, 'quickui_protect_hjkl', 0) != 0
Expand Down