【问题标题】:How do I scroll the YouCompleteMe GetDoc popup with the keyboard?如何使用键盘滚动 YouCompleteMe GetDoc 弹出窗口?
【发布时间】:2022-06-15 23:44:26
【问题描述】:

如果文档字符串太大而无法容纳在弹出窗口中,我希望能够使用键盘滚动 YouComplete GetDoc 弹出窗口。目前我使用<leader>yD 调用弹出窗口。这是来自我的.vimrc 的相关sn-p:

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

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

请注意,我在 tmux 中使用鼠标模式,因此我的鼠标滚动绑定到 tmux,并且我正在使用基于键盘的解决方案。我正在使用vim 8.2

【问题讨论】:

    标签: vim youcompleteme


    【解决方案1】:

    来自文档

    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(这是错误的聊天,因为我有时有点慢)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多