jsfaint / gen_tags.vim

Async plugin for vim and neovim to ease the use of ctags/gtags
https://vim.sourceforge.io/scripts/script.php?script_id=5499
MIT License
312 stars 42 forks source link

file save will lost tag data #53

Closed fcying closed 6 years ago

fcying commented 6 years ago

reproduce ways:

cd  gen_tags.vim
vim
:e autoload/gen_tags.vim
:GenCtags
:!ls -l ~/.cache/tags_dir/homefcyingvimpluggedgen_tagsvim/prj_tags
#echo 8774 bytes
:w
:!ls -l ~/.cache/tags_dir/homefcyingvimpluggedgen_tagsvim/prj_tags
#echo 1923 bytes;  only leave one file(autoload/gen_tags.vim) tag data

config

    let g:gen_tags#ctags_auto_gen = 1  # set 1 or 0 will lost data both.
    let g:gen_tags#gtags_auto_gen = 1
jsfaint commented 6 years ago

Oh, I reproduced this issue. I'll check into it later

fcying commented 6 years ago

vimrc

set nocompatible
set mouse=n

set runtimepath+=~/.vim/plugged/gen_tags.vim

filetype plugin indent on
syntax enable

nnoremap <leader>tg :GenCtags<CR>:GenGTAGS<CR>:echo "gen tags end"<CR>
nnoremap <leader>tc :ClearCtags<CR>:ClearGTAGS!<CR>:echo "clear tags end"<CR>
let g:gen_tags#ctags_auto_gen = 1
let g:gen_tags#gtags_auto_gen = 1

ctags --version

Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Sep 16 2017, 20:34:25
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex

vim 8.1 1-5

jsfaint commented 6 years ago

I found the root cause, this bug came from this commit bdabdba754c0bc4d840b30c8fae13174e04c5ae9

jsfaint commented 6 years ago

@fcying Fixed, could you have a try?

fcying commented 6 years ago

it work fine now~

jsfaint commented 6 years ago

@fcying Thanks for your report and help 👍