xavierd / clang_complete

Vim plugin that use clang for completing C/C++ code.
http://www.vim.org/scripts/script.php?script_id=3302
1.95k stars 308 forks source link

UltiSnip not working any more, seems to be a regression #483

Open adam900710 opened 8 years ago

adam900710 commented 8 years ago

Hi,

Old clang_completion + UltiSnip works quite fine, after clang_complete completes a function call, can just move to the first parameter.

But now, it doesn't work anymore. There are several vim upgrade after the regression, so I'm not sure which caused it.

I reproduced it on all my boxes, although they are all Archlinux. I think any archlinuxer would reproduce it.

  1. Install gvim, vim-ultisnip, vim-clang-complete-git (from AUR) gvim is used to avoid clang bug to corrupt normal vim. And above is the minial packages, so not related to extra plugins.
  2. Set clang_complete to use ultisnip
let g:clang_snippets=1
let g:clang_snippets_engine="ultisnips"
  1. Use C-x C-o to complete printf in the following code:
#include <stdio.h>
int main()
{
        printf("hello\n");
}

Result would be like this, as long as clang_complete is working. 2016-05-03-192338_724x437_scrot

  1. Press to trigger UltiSnip As is the default key to jump to next parameter, and in this case it should jump to parameter '__format'.

But it just insert a tab at the cursor position, like this: 2016-05-03-192343_724x437_scrot

Without working UltiSnip jump, things are very annoying, as we need to remove the parameters and refill all manually.

Hopes someone knows how to fix it or work around it. Thanks

mk-f commented 7 years ago

Same here. https://github.com/myint/clang-complete works, but is much older.