Vim中Python函数帮助滚动问题(YouCompleteMe相关)
Hey there! I totally get being a new Vim + Python IDE user—let's get this sorted out for you.
First, let's name that feature you're using: what you're seeing (the pop-up with np.random.randint's parameters and docs) is called signature help (sometimes referred to as parameter hints) in YouCompleteMe. That's the auto-completion-related feature you're asking about.
Now, for scrolling through the content in that pop-up:
- By default, YouCompleteMe uses these key bindings to navigate the signature help:
- Press
<C-n>(Ctrl + n) to scroll down to the next parameter or section of the documentation - Press
<C-p>(Ctrl + p) to scroll back up to the previous parameter/section
- Press
- If those don't work for you, you can also use standard Vim window-scrolling commands while your cursor is focused on the signature help pop-up:
Ctrl + eto scroll down one lineCtrl + yto scroll up one line
If you want to customize these shortcuts to something more intuitive for you, add these lines to your .vimrc file (replace the keys inside the brackets with your preferred bindings):
let g:ycm_key_list_previous_signature = ['<S-Tab>'] # Shift + Tab for previous let g:ycm_key_list_next_signature = ['<Tab>'] # Tab for next
Just a quick check: since you're already seeing the signature help pop-up, your YouCompleteMe Python setup is working correctly—no need to reconfigure the core Python support here. Just focus on the scrolling bindings above!
内容的提问来源于stack exchange,提问作者Manish Goel

