Giter Site home page Giter Site logo

jsfaint / gen_tags.vim Goto Github PK

View Code? Open in Web Editor NEW
312.0 11.0 42.0 181 KB

Async plugin for vim and neovim to ease the use of ctags/gtags

Home Page: https://vim.sourceforge.io/scripts/script.php?script_id=5499

License: MIT License

Vim Script 100.00%
async vim neovim gtags ctags plugin neovim-plugin vim-plugin

gen_tags.vim's Introduction

gen_tags.vim

This plugin was born from a little requirement of myself more than 10 years ago. After many changes then it become an usable plugin. I got many helps from the lovely people all over the world during the time. Thank you guys for all the help!

For personal reason, I already migrate to lsp for a very long time. I haven't use ctags/gtags for years. Maybe it's time to say goodbye to this plugin.

青山不改,绿水长流,我们后会有期。


Async plugin for Vim/NeoVim to ease the use of ctags/gtags.
It is used for generate and maintain tags for you with multiple platform support, tested on Windows/Linux/macOS.

gen_tags.vim will detect SCM(git, hg, svn) root and use it as the project root path. But you can also create a folder named as .root to specify a directory as the project root path.

Generate/Update ctags and gtags will run in background.

Difference between ctags and gtags

GNU global(aka gtags) is more powerful than ctags, which support definition, reference, calling, called, include, string and etc, but ctags only support definition.

As we can use GNU global why did I still support ctags in this plugin?
That's because GNU global only support 6 languages (C, C++, Yacc, Java, PHP4 and assembly) natively.
ctags can support more languages(41 showed on the website).

Actually global can support more languages with Pygments plugin parser, for more details please refer PLUGIN_HOWTO.pygments in global document.

Installation

  • dein.vim

    Add call dein#add('jsfaint/gen_tags.vim') to your vimrc
    Then launch vim/nvim and run :call dein#install()

  • vim-plug

    Add Plug 'jsfaint/gen_tags.vim' to your vimrc
     Then launch vim/nvim and run :PlugInstall

  • Traditional method

    Unzip the zip file under your .vim(*unix) or vimfiles(windows) directory.

Ctags support

Commands For Ctags

  • :GenCtags

    Generate ctags database

  • :EditExt

    Edit an extend configuration file for this project, use for add third-party library ctags database
    The extend database will be generate automatically.

    e.g.: For libpcap under e:\src\libpcap-1.3.0 add the following content to ext.conf

    e:/src/libpcap-1.3.0
  • :ClearCtags

    :ClearCtags      Remove tags files.
    :ClearCtags!     Remove all files, include the db dir

Gtags support

GTAGS support the third-party library by set an environment variable GTAGSLIBPATH
But you can take a more straightforward way to do the same thing, by create a symbol link of the library

  • Linux/macOS

    ln -s /usr/include/ .
  • Windows

    mklink /J include C:\TDM-GCC-32\include

Commands For Gtags

  • :GenGTAGS

    Generate GTAGS

  • :ClearGTAGS

    :ClearGTAGS     Remove GTAGS files
    :ClearGTAGS!    Remove all files, include the db dir

Key Mapping

ctrl+] is the default mapping support by Vim for definition

The following mapping is set for gtags when g:gen_tags#gtags_default_map is 1, which uses the cscope interface .

Ctrl+\ c    Find functions calling this function
Ctrl+\ d    Find functions called by this function
Ctrl+\ e    Find this egrep pattern
Ctrl+\ f    Find this file
Ctrl+\ g    Find this definition
Ctrl+\ i    Find files #including this file
Ctrl+\ s    Find this C symbol
Ctrl+\ t    Find this text string

Detail Usage

For more details about the usage, please refer to the help document in vim by :help gen_tags.vim


Thanks for reading :)
If you like this plugin, please star it on github!

And one more thing, bug reports and pull-requests are greatly appreciated :)

gen_tags.vim's People

Contributors

dsummersl avatar fcying avatar gitter-badger avatar hanxi avatar hhktony avatar hiberabyss avatar jetm avatar joereynolds avatar jsfaint avatar kamilcuk avatar kashewnuts avatar kolgotko avatar mkalinski avatar naquad avatar sassanh avatar shikchen avatar voldikss avatar yuki-yano avatar yuys13 avatar zhuangya avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gen_tags.vim's Issues

关于结果很多的时候

我在知乎上看到了你的回答,所以直接用中文进行提问咯,结果很多的时候会占据很多屏幕空间(这个应该是我没设置),而且还要全部看完才能选择,能不能改善以下选择的方式,可以用光标进行选择,增加预览功能就更好了.啊哈

Performance problems

On my machine at home, gen_tags is for some reason, a major bottleneck.
Even a simple command like :help ls will stall for 2-3 seconds.

I've ran some profiling on it (I do have other plugins too) and this is the main result:

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
    6              8.085853  <SNR>16_gtags_add()
   27              1.353772  ale#util#Writefile()
    1   0.098249   0.098233  provider#pythonx#Require()
   27   0.038211   0.037894  ale#job#Start()
   31   0.065060   0.036540  deoplete#init#_context()
   47              0.025709  <SNR>36_Highlight_Matching_Pair()
  482              0.023165  <SNR>24_repo()
   48   0.023581   0.022268  <SNR>71_parse_screen()
    1   0.120068   0.021739  provider#python3#Call()
  469              0.020008  ale#Var()
  235   0.125058   0.019574  fugitive#statusline()
   21   0.030261   0.019258  ale#sign#SetSigns()
   21              0.017006  ale#util#GetMatches()
  235   0.050412   0.014152  <SNR>24_repo_head()
  243   0.015843   0.013818  <SNR>24_buffer()
  235   0.018808   0.013777  <SNR>24_repo_head_ref()
   41   0.018163   0.010774  <SNR>54_vimoption2python()
   27   1.421284   0.010265  <SNR>62_RunJob()
   65              0.009720  deoplete#util#uniq()
  251   0.017571   0.009328  <SNR>24_buffer_spec()

I've attached the file so you can see where the bottlenecks are coming from, note that the majority of it seems to be in gtags_add

FUNCTION  <SNR>16_gtags_add()
Called 6 times
Total time:   8.085853
 Self time:   8.085853

count  total (s)   self (s)
    6              0.000079   if filereadable(a:file)
    6              0.000037     let l:cmd = 'silent! cs add ' . a:file
    6              8.085588     exec l:cmd
    6              0.000074   endif

Output of global --version

: global --version
global (GNU GLOBAL) 6.6.1
Copyright (c) 1996-2017 Tama Communications Corporation
License GPLv3+: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

echoing out l:cmd in the s:gtags_add gives this

silent! cs add /home/joe/.cache/tags_dir/homejoeprogramsjoereynoldsaudio/GTAGS

The contents of the GTAGS file look like any other to me.

If there's anything else I can do to help, let me know!

profile.log

[feature request] Highlight tags

I find this quite useful in vim-easytags, and I think that's the only thing that IMHO gen_tags.vim is missing for being perfect.

It periodically highlights some of the tags (functions as Keywords I think).

Thanks a lot for this plugin!

[deoplete][gtags] Error: File does not exists

After updating I now get this error, I have global installed and GTAGS is in the root of my project.
What file is this referring to?

Also it should read as "File does not exist" :)

Auto generate tags throws a unicode error for certain Windows paths

This issue cropped up a month or two ago but I just got time to dig in deeper to provide details and a workaround.

Problem is when auto generate tags is enabled, the following error pops up every time I write the file.

Error detected while processing function <SNR>18_ctags_auto_update[14]..<SNR>18_ctags_prune[10]..provider#python3#Call:
line   18:
  File "<string>", line 1

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

This is a common problem on Windows where paths that include "C:\Users" cause Python to attempt to parse the string as a unicode sequence. This only occurs in paths that include "C:\Users" because of the \U. Other paths are not affected.

The issue is a strange one. It occurs in ctags.vim in the function s:ctags_auto_update. It's strange because gen_tags#fix_path isn't working for l:file but l:tagfile is fine and includes gen_tags#fix_path in it's call chain. Moving gen_tags#fix_path's substitute command inside the function fixes the issue.

function! s:ctags_auto_update() abort
  let l:tagfile = gen_tags#get_db_dir() . '/' . s:ctags_db

  if !filereadable(l:tagfile)
    return
  endif

  " let l:file = fnamemodify(gen_tags#fix_path('<afile>'), ':p')
  " let l:file = expand(l:file)
  let l:file = fnamemodify(expand('<afile>'), ':p')
  let l:file = substitute(l:file, '\\', '/', 'g')

  "Prune tags content for saved file
  if g:gen_tags#ctags_prune
    call s:ctags_prune(l:tagfile, l:file)
  endif

  call s:ctags_update(l:file)
endfunction

The gen_tags#fix_path call should work, but for some reason doesn't. I'm at the limit of my vimscript knowledge so consider this a workaround rather than a proper fix.

OS: Windows 10 Pro
Python: various from 3.5.4-3.7.0
NVIM:

NVIM v0.3.1
Build type: RelWithDebInfo
LuaJIT 2.0.5
Compilation: C:/msys64/mingw64/bin/gcc.exe -Wconversion -O2 -g -DMIN_LOG_LEVEL=3 -Og -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -D__USE_MINGW_ANSI_STDIO -D_WIN32_WINNT=0x0600 -Wvla -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -IC:/projects/neovim/build/config -IC:/projects/neovim/src -IC:/projects/neovim/.deps/usr/include -IC:/msys64/mingw64/include -IC:/projects/neovim/build/src/nvim/auto -IC:/projects/neovim/build/include
Compiled by appveyor@APPVYR-WIN

Features: -acl +iconv -jemalloc +tui 

Relevant init.vim lines:

call dein#add('jsfaint/gen_tags.vim', { 'if': 'executable("ctags") || executable("global")' })
let g:gen_tags#use_cache_dir=0
let g:gen_tags#ctags_auto_gen=1
let g:gen_tags#gtags_auto_gen=1
let g:gen_tags#ctags_prune=1

Increase Python 3's priority.

Problems summary

The Python interface will be evaluated before the Python 3 interface

Expected

The Python 3 interface will be evaluated before the Python interface.
Because Python 2 will be EOL to 2020, there is no reason to give priority over Python 3.

Environment Information (Required!)

$ vim --version | grep python
+cscope            +linebreak         +python/dyn        +vreplace
+cursorbind        +lispindent        +python3/dyn       +wildignore

Provide a minimal init.vim with less than 50 lines

call plug#begin('~/.cache/plugged')
Plug 'jsfaint/gen_tags.vim'
call plug#end()

let g:loaded_gentags#gtags = 1  " gtags is irrelevant, it is off.

How to reproduce problems from vim startup

  1. $ vim test.py
  2. Run :python3 print('hello') in Vim's command line mode.
  3. Error!
E837: このVimでは :python を使った後に :py3 を使えません
E263: このコマンドは無効です,ごめんなさい: Pythonライブラリをロードできませんでした.

g:gen_tags#global_opts

Setting g:gen_tags#gtags_opts doesn't set the options passed to global, which is good but we need a g:gen_tags#global_opts then. To set things like --gtagsconf.

Option to set tagdir

Currently (like you said in #9), the file for tags generated by ctags resides in $HOME/.cache/tags_dir.
I think most people (me included) would prefer this to be in the top level of the project directory so that Vim automatically picks it up.

add option to use only ctags

I just installed the plugin on Windows and I get error that gtag doesn't exist

GNU Global not found gen_gtags.vim need GNU Global

However, I would like to just use ctags and not gtags. I have portable ctags and added to path variable. Am I doing something wrong or maybe this is an option that can be added.

Thank you

set ctag rules per filetype

I understand that gen_tags creates a config per project, but my projects are usually a bunch python backend, and typescript/es6/react/html/css/etc frontend, so I'd like ctags to generate tags smartly depending on the file I'm in.

I have not managed to get a result satisfying, eg jumping to some json file when Ctrl-] on a python import.

Reading through the gen_tags.txt help file, I cannot figure this out.
I tried from a python file to add –python-kinds=-i (following this post) in the :EditExt file, then ran GenCtags, but didn't get a good result

This example is me trying to jump to the definition of a django template, but instead of the expected base.html file, I arrive on a totally unexpected welcome_page.css.

Plug 'jsfaint/gen_tags.vim'
Plug 'tweekmonster/django-plus.vim', { 'for': ['python', 'htmldjango', 'html'] }
$ vim -v
NVIM v0.3.4
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt -Wconversion -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.3.4/src -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Features: +acl +iconv +jemalloc +tui 
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Run :checkhealth for more info

$ ctags --version
Universal Ctags 0.0.0(c45511a3), Copyright (C) 2015 Universal Ctags Team
Universal Ctags is derived from Exuberant Ctags.
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Aug 24 2018, 02:04:45
  URL: https://ctags.io/
  Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml

Do you have suggestions or a link to the documentation explain how to properly setup a ctag conf for a project?

the plugin is creating `.git/` folders

This is my settings, but right now when I open a file in a directory that's not a git repo or subfolder of a git repo. It creates .git/ folder to store the tags inside.

let g:loaded_gentags#gtags = 1
let g:gen_tags#ctags_auto_gen = 1
let g:gen_tags#ctags_use_cache_dir = 0

What I expect is the following since I have let g:gen_tags#ctags_use_cache_dir = 0

  • When in a git repo (even in a subdirectory) the plugin should manage to find the root .git/ folder & store the tags inside of it, if it failed then it should use the cache directory.
  • If I'm not inside a git repo, then it should store the tags files in the cache directory.

It was working like this before but maybe a recent change changed the behavior somehow.

Autogenerate GTAGS file upon opening a file in a GIT or HG project

I am currently using guten-tags plugin which will create tags file on its own when i open a file and update the tags file if i edit it.
Today I found your plugin which supports GTAGS also and I am trying to use it.
But the GTAGS file is not auto generated as of now.
Is there a plan to make the GTAGS file auto generate on opening a file in a project.

Auto generate ctags file

I'm trying out this plugin that looks exactly like what I need, I like its simplicity a lot. But I'm a bit struggling to get it work properly. Here is my setup

let g:loaded_gentags#gtags = 1
let g:gen_tags#ctags_auto_gen = 1
let g:gen_tags#verbose = 1

When I open a file I get the message that it's working & generating tags for the project

CGenerate project ctags database in [Background]

But I can't find the tags file anywhere, not the root of the project & not inside ~/.cache/tags_dir/<project_path>?

Although set tags shows that there is a file here ~/.cache/tags_dir/<project_path>/prj_tags but when I ls inside the folder, it's empty.

Tags file not sorted error

This is with ctags. Sometimes (not for all the tags, that is) tying to autocomplete with CTRL + N I get this error:

Scanning tags.                                                                                                                                                                                                        
E432: Tags file not sorted: /home/user/.cache/tags_dir/homeusersrc/prj_tags                                                                                                                
Press ENTER or type command to continue                                                               

I press enter and it seems to work as expected.

Not sure if this is an issue, but I never experienced this before when using ctags.

Potential usability issue (Dont suppress gtags errors)

if you try and do gtags in a file that you do not have access to, the whole indexing of tags fails.

For example, I had a .log file owned by root which I couldn't read.
gen_tags would generate empty GTAGS GPATH and GRTAGS files.
I realise this is a gtags problem and nothing to do with gen_tags but thought I would flag it up.

When you manually call gtags in a project, at least the error comes through. gen_tags seems to be suppressing the error (Does this happen with g:gen_tags#verbose = 1?).

I will try and post a way to replicate soon.

Thanks!

!global command doesn't work after update.

After recent update, !global command doesn't work in vim.
Error: global command failed. command line: global --result=ctags-mod -qf 'hoge.py', or any other commands of global in vim.
When I disable gen_tags.vim, it works fine.

gen_tags doesn't seems to work at all

I have installed gen_tags and try it with a medium size project (500 MB). Here's my settings:

let g:loaded_gentags#gtags = 1
let g:gen_tags#ctags_auto_gen = 1
let g:gen_tags#use_cache_dir = 0
let g:gen_tags#blacklist = ['*.min.js', '*.min.css', 'build', 'vendor', '.git', 'node_modules', '*.vim/bundle/*']

When I open the project, there is nothing happen, I try to use Ctrl + ] and neovim results with "no tags file". I thought ctags_auto_gen will automatically generate tags file, no? :GenCtags doesn't do anything, and neither <project folder>/.git/tags_dir or $HOME/.cache/tags_dir/<project name> exists, even tho my project use git.

Here is my init.vim if that help: https://github.com/huyvohcmc/dotfiles/blob/master/init.vim

Function name does not match script file name: gen_tags#mkdir

I got below issue:
Error detected while processing /home/xileihu/.vim_runtime/plugged/gen_tags.vim/autoload/gen_tags/ctags.vim:
line 45:
E746: Function name does not match script file name: gen_tags#mkdir

vim version:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Dec 8 2017 12:47:23)
Garbage after option argument: "-version"
More info with: "vim -h"

Disable Update GTags in the background message

After enabling autoupdate for gtags everytime I open a file with vim I get the "Update Gtags in the background" message AND I have to acknowledge it by hitting . Only then can I work on the file.

Is there a way to disable the message and the need to hit ?

Rebuild tags after branch change

Not sure if this is a feature request or a question but it would be very useful if gen_tags was rebuilding the tags DB after a branch change.

It gets me confused evey now and then and I basically clean the tags and generate them again (not sure if the first step is required).

Thanks in advance.

This plugin is awesome, thanks for sharing it!

GSYMS not delete by ClearGTAGS

os:ubuntu 16.04
vim8

GenGTAGS
ClearGTAGS
GSYMS not delete.

:ClearGTAGS! can not run, error log "E477: can not use '!' "

:ClearCtags! run normally

gtags keymapping is not working

Hi Sir,
i am using [gen_tags.vim].commit = '29ce12c' .
below is my gen_tags setting in vimrc
Enabe gtags and try to use the keymapping of cscope .
image

However, when i press below keymaping there is no response. The keymapping is OK as using ':map' in vim. See below screenshot
image

While press "Ctrl+\+c" , it only shows below meesage.
image

As try to use ":cs show" to see whether the connection of cscope is working or not , showing below message

/abc/project/vendor/proprietary/mtkcam/.git/tags_dir/GTAGS
image

gtags related data as below : The data size seems like normal .
image

However, the keymap of "ctrl+]" and "ctrl+t" is working as expected.

Because i need the other function of cscope with gtags.
can you help me identify what the probelm it is ?

Regards,

g:gen_tags#use_cache_dir creates useless directories when used with vim-fugitive

Tpope's vim-fugitive plugin creates a temporary 'fugitive:' directory when the :Gdiff, :Gvdiff, :Gsdiff, and possibly other commands are issued. If g:gen_tags#use_cache_dir is set to 0, gen_tags will create a tags file for that directory, preventing it from being deleted, which in turn causes it to show up in the git index, as well as getting in the way of things such as go fmt.

How to reproduce:

  • setup vim with fugitive.vim and gen_tags
  • set g:gen_tags#use_cache_dir = 0
  • open a file in a git repo
  • run :Gdiff

Blacklist does not seem to work.

Hello,
I tried to set gen_tags#blacklist to avoid tags generation when I open the vim plugins help docs.But I found that there were still tags dir in ~/.cache/tags_dir, such as homeyangcisvimpluggedgen_tagsvim, or homeyangcisvimpluggedvim-airline.
The complete gen_tags plugin settings are:

let $GTAGSLABEL = 'native-pygments'                                                                                                                                                       
let $GTAGSCONF = '/usr/share/gtags/gtags.conf'                                                                                                                                            
let $GTAGSLIBPATH='/usr/include/'                                                                                                                                                         
let g:gen_tags#gtags_auto_gen = 1                                                                                                                                                         
let g:loaded_gentags#gtags = 0                                                                                                                                                            
let g:loaded_gentags#ctags = 1  " disable ctags support, use gtags only                                                                                                                   
let g:gen_tags#ctags_auto_gen = 0                                                                                                                                                         
let g:gen_tags#blacklist = ['/home/yangcis/.vim/plugged']                                                                                                                                 
nmap <leader>gg :GenGTAGS<cr>                                                                                                                                                             
nmap <leader>cg :ClearGTAGS!<cr>                                                                                                                                                          
autocmd User GenTags#GtagsLoaded nnoremap <leader>gd <c-]>

Expect your answer. Thank you!

Remove default Ctrl+\ mappings (or make optional)

I think the default-provided Ctrl+\ mappings for cscope hotkeys are a great inspiration, but defaulting them to being enabled might be a little intrusive for some (e.g. those who already have Ctrl+\ combinations mapped).

In my opinion, making said mappings optional (via something like g:gen_tags#gtags_mappings) or, even better, removing them entirely and providing instructions/examples on how to add said mappings to a user's .vimrc in the documentation would be ideal. Doing so would really help make this plugin more clean/orthogonal.

If you think this is worth pursuing but don't have the time, just let me know and I could try introducing a pull request with said changes.

Keep up the great work, by the way! I'm really liking this plugin.

Request: Blacklist Directories for Scanning

Thanks for making this project! I have a suggestion that I'd like to propose before making a PR.

I typically run Neovim from my home directory. I then open tabs to present a separate 'project' in Vim. I notice, however, that ctags gets triggered immediately from start, which makes it run against my home directory. All 200,000 files begin getting tagged which eventually freezes up my computer. My proposal is to have a blacklist of exact matches of directories that should not trigger a scan by gen_tags.vim.

Idea: set tags to .git/tags_dir instead of ~/.cache/tags_dir?

I like how simple this plugin is & how good it works. But one thing I think it can be better is where it stores the tags files. Right now it stores them in ~/.cache/tags_dir which is ok, but I think it might be better to store them in .git/tags_dir.

This will make cleaning up tags files easier, because if you delete a project folder then you clear the tags files too + since the plugin already knows where is the .git folder this shouldn't be a big deal.

What do you think?

How could i disable gtags

I want to disable gtags because I don't use them and it promps every time I open the neovim a message about missing GNU Global

Request: Update ctags incrementally

Hi there, mahalo for putting this project together. Only tested with ctags with autogen on since I'm not using any languages currently supported by gtags.

While making quick edits in vim, I noticed that my project's tags file would get stuck in an partially-written state (for example, a complete tags file of 50K lines would only have 3K lines after a quick edit to a project file)

Looks like every time :w is used, the plugin seems to regenerate ctags for the project from scratch while vim is open. If I quit vim before this process is complete, then I'm left with a partially-generated tags file.

Incremental ctag updates could have the following benefits:

  • Preserves the bulk of the project tags generated earlier
  • Reduced cpu time, ctags is a cpu hog
  • More likely to capture updates before the user quits vim

file save will lost tag data

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

(Neovim) Cannot redefine function <SNR>59_wrap: It is in use

Hi,

Great looking plugin, huge fan of gtags.

I've just tried it out and whenever I try and :wq on a file it gives me the following error message

Error detected while processing function 4[30]..<SNR>22_callback:                  
line   33:                                                                         
Vim(function):E127: Cannot redefine function <SNR>59_wrap: It is in use    

These are the config options I have for gen_tags in my init.vim file

"gen_tags
let g:gen_tags#ctags_auto_gen = 1
let g:gen_tags#gtags_auto_gen = 1

I am using xubuntu.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.