vim - 如何使用键盘滚动 YouCompleteMe GetDoc 弹出窗口?

标签 vim youcompleteme

我希望能够滚动 YouComplete GetDoc在文档字符串太大而无法放入弹出窗口的情况下,使用键盘弹出。目前我用 <leader>yD 调用弹出窗口.这是我的 .vimrc 中的相关片段:

nmap <leader>yd <plug>(YCMHover)
nnoremap <leader>yD :YcmCompleter GetDoc<CR>
let g:ycm_auto_hover = '' " disable auto popups

这是一个文档字符串的示例,它太大而无法放入弹出窗口中:

enter image description here

请注意,我在 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/

相关文章:

c - 基于 VIM 中 switch/case 语句范围的 cindent 缩进问题

vim - 从命令行启动时 MacVim 颜色问题

vim - 如何使用bear和make自动创建json编译数据库?

c++ - cmake 生成多个 compile_commands.json?

linux - 将 Octave 4.0/4.2.1 中的默认编辑器设置为 Vim

vim-NERDTree : order bookmarks?

vim - 发现 Vim 退出状态的原因

python - Vim : "YouCompleteMe unavailable: This package should not be accessible on Python 3" 错误

Vim YouCompleteMe 插件 - 不要下载 clang