

GitHub - jsfaint/gen_tags.vim: Async plugin for vim and neovim to ease the use o...
source link: https://github.com/jsfaint/gen_tags.vim
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

gen_tags.vim
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
-
Add
call dein#add('jsfaint/gen_tags.vim')
to your vimrc
Then launchvim
/nvim
and run:call dein#install()
-
Add
Plug 'jsfaint/gen_tags.vim'
to your vimrc
Then launchvim/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 toext.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 :)
Recommend
-
6
Introducing My First Vim/Neovim Plugin2020-12-18Nvim306 words 2 mins read 1 times readAfter using and learning Neovim for over 2 years, I have finally...
-
1610
nvim-cmp A completion plugin for neovim coded by Lua. Status can be used. feedbacks are wanted. Concept Support pairs-wise plugin automatically Fully customizable via Lua functions
-
73
Plantuml Previewer Vim Vim/NeoVim plugin for preview PlantUML Dependencies Graphviz (https://www.graphviz.org/download/)
-
205
Copilot.vim GitHub Copilot is an AI pair programmer which suggests line completions and entire function bodies as you type. GitHub Copilot is powered by the OpenAI Codex AI system, trained on public Internet text and billions of line...
-
3
I've slowly adding more and more lua functions into my neovim configuration, and recently I noticed a pattern for a class of functions that reach out to run shell commands that can be abstracted away. Telegraph.nvim C...
-
8
ripgrep.vim A plugin for Vim8/Neovim to search text by ripgrep (rg). What's different from jremmen/vim-ripgrep? Calling...
-
7
Pipeline: Stage Tags Metadata
-
8
📍 Sync and Async Programming 😶🌫️ In modern world with so many complexities in Software development there are smart architectures to deal with it. For example if we build our application and later on we decide it to handle thousan...
-
8
Async Autocompletion Plugin for Vim A lightweight async autocompletion plugin written entirely in vim9script. Features Code completion using LSP ...
-
6
girishji/autosuggest.vim main
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK