我希望能够滚动 YouComplete GetDoc
在文档字符串太大而无法放入弹出窗口的情况下,使用键盘弹出。目前我用 <leader>yD
调用弹出窗口.这是我的 .vimrc
中的相关片段:
nmap <leader>yd <plug>(YCMHover)
nnoremap <leader>yD :YcmCompleter GetDoc<CR>
let g:ycm_auto_hover = '' " disable auto popups
这是一个文档字符串的示例,它太大而无法放入弹出窗口中:
请注意,我在 tmux 中使用鼠标模式,因此我的鼠标滚动绑定(bind)到 tmux,并且我正在寻求基于键盘的解决方案。我正在使用 vim 8.2
.
最佳答案
来自文档
POPUP SCROLLBAR *popup-scrollbar*
If the text does not fit in the popup a scrollbar is displayed on the right of
the window. This can be disabled by setting the "scrollbar" option to zero.
When the scrollbar is displayed mouse scroll events, while the mouse pointer
is on the popup, will cause the text to scroll up or down as you would expect.
A click in the upper half of the scrollbar will scroll the text down one line.
A click in the lower half will scroll the text up one line. However, this is
limited so that the popup does not get smaller.
这让我坚信滚动条是用来通过鼠标进行交互的。
认为even YCM coauthor and maintainer just told me so (这是错误的聊天,因为我有时有点慢)。
关于vim - 如何使用键盘滚动 YouCompleteMe GetDoc 弹出窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72602710/