I am navigating c++ code using gvim and ctags. Size of the ctags file is 3.5 GB. ctrl-] is working pretty quick, but g+ctrl-] is taking nearly 5 seconds, which I think is too much (that is too much time for searching a sorted ctgas file!). Any suggestions to improve speed?
My .gvimrc:
set gcr=n-c-v:blinkoff0 " it switches off cursor blinks
set lines=52 columns=120 " Sets the geometry of gui window.
colorscheme default " desert load the color scheme of choice
set nocompatible " This must be first, because it changes other options as a side effect.
set ic
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set history=10000 " keep 100 lines of command line history
set showcmd " display incomplete commands
set incsearch " do incremental searching
set et
set paste
set ruler
When you have 'ignorecase'
on, Vim mostly needs to perform a linear search of the tags database, instead of a much faster binary search. You may be able to avoid that penalty with a proper tags database that indicates case-folded sorting by this line:
!_TAG_FILE_SORTED 2
See :help 'tagbsearch'
for all the details.
Problem is due to ic! When I removed ic(ie set noic), then the speed was drastically improved. g+ctrl-] is as fast as ctrl-] now.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.