Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vim takes long time to scan tags when complete

Tags:

vim

my vim will scanning tags for a long time when press tab to complete. I don't know it is about plugins or vimrc file. it really annoy. my vimrc is:https://gist.github.com/anonymous/5591546

it seems when I press tab it even scan the /usr/include directory,it take long time,it makes me crazy.

such when I edit a file like:

#include<stdio.h>
#include<ioste>
main()
{
    int x = 8;
    float y = 9.0;
    char z = 'a';

    int *p = &x;
    float *q = &y;
    char *r = &z;

    printf("the *p address is %x\n",p);

    printf("%d\n", sizeof(p));
    printf("%d\n", sizeof(x));
    printf("%d\n", sizeof(y));
    printf("%d\n", sizeof(z));
    printf("%d\n", sizeof(r));
    printf("%d\n", sizeof(q));
    printf("%c\n", *r);
    printf("%f\n", *q);
}

in include it will begin to tell scanning tags,and vim stuck.

like image 337
kuafu Avatar asked May 16 '13 13:05

kuafu


1 Answers

The directories that are scanned for tags databases are configured by the 'tags' option. You seem to have /usr/include/** in there.

The insert mode completion uses the sources configured by the 'complete' option; by default, this includes tags via the t value. You can turn that off with :set complete-=t.

Note that you can also abort the lengthy scanning by pressing <C-c>.

like image 172
Ingo Karkat Avatar answered Oct 23 '22 19:10

Ingo Karkat