Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmap menu 不正常 #32

Open
hellowxwworld opened this issue May 12, 2020 · 2 comments
Open

vmap menu 不正常 #32

hellowxwworld opened this issue May 12, 2020 · 2 comments

Comments

@hellowxwworld
Copy link

Noremap 同个 menu, 快捷键按了一个之后就返回,操作正常, 但是 vmap 同个 menu, 按了一个快捷键之后会重新跳出 menu, 跳出的次数跟 menu size 同样多次

@Freed-Wu
Copy link
Contributor

Please use

xnoremap <Space> :<C-u>call quickui#menu#open()<CR>

to replace

xnoremap <Space> :call quickui#menu#open()<CR>

because for the latter, it will execuate :'<,'>call quickui#menu#open(), it means if you select multi lines, it will execuate the code in each line.

@Freed-Wu
Copy link
Contributor

help :func-range
:fu[nction][!] {name}([arguments]) [range] [abort] [dict] [closure]
			定义 {name} 命名的新函数。函数体在之后的行给出,直到匹
			配的 |:endfunction| 为止。
...
					*:func-range* *a:firstline* *a:lastline*
			如果给出 [range] 参数,则该函数自己能理解并处理行范
			围。该范围通过 "a:firstline" 和 "a:lastline" 定义。如
			果没有 [range],":{range}call" 会在该范围的每一行分别
			执行该函数,每次光标都定位在处理行的行首。见
			|function-range-example|。

会在该范围的每一行分别执行该函数

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants