Reputation: 14
I used Jedi-vim for vim python auto-completion and it works well. It has shortcut to show preview/documentation of a function on demand.
I'm working on C++ projects now and I'm trying to use original omnicomplete+ctag to accomplish the same thing. But I can't find functions similar to in Jedi-vim.
I don't want to show preview window all the time by doing ":set completeopt+=preview", and I don't want to use huge autocompletion plug-in like "YouCompleteMe", I just simply want to open/jump to preview on demand. Is there any way to accomplish it? Thanks in advance!
Upvotes: 0
Views: 379
Reputation: 196476
I think you will find :help preview-window
interesting.
" shows the definition of foo in the preview window
:ptag foo
" shows the definition of the symbol under the cursor in the preview window
<C-w>}
You'll need to index your project with ctags or some compatible program for that feature to work, though.
" doesn't need ctags
:psearch foo
Upvotes: 0