xolox / vim-easytags

Automated tag file generation and syntax highlighting of tags in Vim
http://peterodding.com/code/vim/easytags/
1.01k stars 109 forks source link

Vim locks up with easytags plugin #27

Closed ldx closed 11 years ago

ldx commented 12 years ago

When I use the plugin with a large project (linux kernel in my case) sometimes it just completely locks up after a few seconds. If I press CTRL-C it resumes and if verbose mode is set I can see in messages the following lines:

Messages maintainer: Bram Moolenaar <Bram@vim.org>                                                                                                 
"af_unix.c" 2300L, 54010C                                                                                                                          
"~/kernel/include/net/af_unix.h" 71L, 1891C                                                                                                        
Reading viminfo file "/home/ldx/.viminfo" marks                                                                                                    
"af_unix.c" 2300L, 54010C                                                                                                                          
not found in 'runtimepath': "autoload/xolox/shell.vim"                                                                                             
easytags.vim 2.8.1: Retrieved 43 supported languages in 0.012 seconds.                                                                             
easytags.vim 2.8.1: Initialized cache of tagged files in 47 seconds.                                                                               
easytags.vim 2.8.1: Highlighted tags in ~/kernel/net/unix/af_unix.c in 8 seconds (using Python).                                                   
"~/kernel/include/net/af_unix.h" 71L, 1891C                                                                                                        
"~/kernel/include/net/af_unix.h" 71L, 1891C                                                                                                        
easytags.vim 2.8.1: Executing /usr/bin/ctags --fields=+l --c-kinds=+p --c++-kinds=+p --sort=no -f- '--language-force=c++' '/home/ldx/kernel/include/net/af_unix.h'.                                                                                                                                       
not found in 'runtimepath': "autoload/xolox/shell.vim"                                                                                             
easytags.vim 2.8.1: Updated tags for ~/kernel/include/net/af_unix.h in 2.82 seconds.                                                               
easytags.vim 2.8.1: Vim:Interrupt (at function xolox#easytags#autoload..xolox#easytags#highlight, line 31)                                         
Type  :quit<Enter>  to exit Vim                                                                                                                    
Press ENTER or type command to continue

I don't have any local settings for easytags.

KennethAdamMiller commented 11 years ago

I too have this problem. After seeing this issue post, I ran my vim under verbose and got something very much like what you did. I think what happens is that the automatic tags generation is locking up the program. Is your bash shell a login shell? I'm on mac and mine is a login shell, with set shell=bash\ -l. I found that when I erased my old tags, the problem went away. I think what happened is that at some point, a different source file was being used, and somehow a tags file got dropped in a local directory. easytags found it, and then used that on a wrong file, effectively getting stuck in an infinite loop.

xolox commented 11 years ago

I don't see the recursive option in the output you gave but I'm pretty sure that your tags file contained half of the Linux kernel tags:

Initialized cache of tagged files in 47 seconds.

That's going to be slow no matter which Vim plug-in you use to manage that tags file.