[
  {
    "path": ".gitignore",
    "content": "doc/tags\n*.class\n.floo\n.flooignore\n*.netrwhist\n*-rplugin~\n*rplugin.vim\n.SpaceVim.log\ndocs/_site/*\ndocs/Gemfile.lock\n# Ignore tags created by etags, ctags, gtags (GNU global) and cscope\nTAGS\n.TAGS\n!TAGS/\ntags\n.tags\n!tags/\ngtags.files\nGTAGS\nGRTAGS\nGPATH\nGSYMS\ncscope.files\ncscope.out\ncscope.in.out\ncscope.po.out\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: python\nsudo: false\n\ncache:\n  pip: true\n\nenv:\n  global:\n    - DEPS=$HOME/deps\n    - PATH=$DEPS/bin:$PATH\n  matrix:\n    - LINT=vimlint-errors\n    - LINT=vimlint\n    - LINT=vint-errors\n    - LINT=vint\n    - LINT=vader\n\nmatrix:\n  allow_failures:\n    - env: LINT=vimlint\n    - env: LINT=vint\n\ninstall:\n  - |\n    if [ \"${LINT#vimlint}\" != \"$LINT\" ]; then\n      git clone --depth=1 https://github.com/syngan/vim-vimlint /tmp/vimlint\n      git clone --depth=1 https://github.com/ynkdir/vim-vimlparser /tmp/vimlparser\n    elif [ \"${LINT#vint}\" != \"$LINT\" ]; then\n      virtualenv /tmp/vint && source /tmp/vint/bin/activate && pip install vim-vint\n    elif [ \"${LINT#vader}\" != \"$LINT\" ]; then\n      git clone https://github.com/junegunn/vader.vim.git /tmp/vader\n      C_OPTS=\"--prefix=$DEPS --with-features=huge --disable-gui --enable-pythoninterp\"\n      git clone --depth 1 https://github.com/vim/vim\n      cd vim\n      ./configure $C_OPTS\n      make\n      make install\n      cd -\n    fi\nscript:\n  - |\n    if [ \"$LINT\" = \"vimlint\" ]; then\n      sh /tmp/vimlint/bin/vimlint.sh -l /tmp/vimlint -p /tmp/vimlparser .\n    elif [ \"$LINT\" = \"vimlint-errors\" ]; then\n      sh /tmp/vimlint/bin/vimlint.sh -E -l /tmp/vimlint -p /tmp/vimlparser .\n    elif [ \"$LINT\" = \"vint\" ]; then\n      vint .\n    elif [ \"$LINT\" = \"vint-errors\" ]; then\n      vint --error .\n    elif [ \"$LINT\" = \"vader\" ]; then\n      vim -Nu test/test.vim -c 'Vader! test/**'\n    fi\n"
  },
  {
    "path": ".vintrc.yaml",
    "content": "cmdargs:\n  # Checking more strictly\n  severity: style_problem\n\npolicies:\n  ProhibitImplicitScopeVariable:\n    enabled: false\n  ProhibitAbbreviationOption:\n    enabled: false\n"
  },
  {
    "path": "README.md",
    "content": "# gtags.vim\n\n[![](https://spacevim.org/img/build-with-SpaceVim.svg)](https://spacevim.org)\n[![Build Status](https://travis-ci.org/SpaceVim/gtags.vim.svg?branch=master)](https://travis-ci.org/SpaceVim/gtags.vim)\n\nThe gtags.vim plugin script integrates the GNU GLOBAL source code tag system with Vim.\n\nThe development of gtags.vim is stopped. check [gtags.nvim](https://github.com/wsdjeg/gtags.nvim) instead.\n\n## Installation\n\nThis is part of SpaceVim's tags layer, and based on SpaceVim's API.\n\nFeatures:\n\n- generate gtags file automatically\n- quickfix list support\n- fuzzy find souces\n    - denite\n    - unite\n    - fzf\n    - leaderf\n    - fzy\n\n"
  },
  {
    "path": "addon-info.json",
    "content": "{\n  \"name\": \"gtags\",\n  \"description\": \"gtags in vim\",\n  \"author\": \"spacevim.org\"\n}\n"
  },
  {
    "path": "autoload/gtags/logger.vim",
    "content": "scriptencoding utf-8\n\nlet s:LOG = SpaceVim#api#import('logger')\n\ncall s:LOG.set_name('Gtags')\n\n\"\"\n\" set the path to gtags log file.\nlet g:gtags_log_file = get(g:, 'gtags_log_file', '')\n\nif !empty(g:gtags_log_file)\n    call s:LOG.set_file(g:gtags_log_file)\nendif\n\nfunction! gtags#logger#log(level, msg) abort\n    if a:level ==# 'info'\n        call s:LOG.info(a:msg)\n    elseif a:level ==# 'warn'\n        call s:LOG.warn(a:msg)\n    elseif a:level ==# 'error'\n        call s:LOG.error(a:msg)\n    endif\nendfunction\n\nfunction! gtags#logger#view(...)\n    echo s:LOG.view(get(a:000, 0, 'info'))\nendfunction\n\n\n\n"
  },
  {
    "path": "autoload/gtags.vim",
    "content": "scriptencoding utf-8\n\nif !executable('gtags')\n    echohl WarningMsg\n    echom 'you need to install gnu global!'\n    echohl NONE\n    finish\nelse\n    let s:version = split(matchstr(split(system('gtags --version'), '\\n')[0], '[0-9]\\+\\.[0-9]\\+'), '\\.')\nendif\n\nif exists('g:loaded_gtags')\n    finish\nendif\nlet g:loaded_gtags = 1\n\n\n\" SpaceVim's API\n\nlet s:JOB = SpaceVim#api#import('job')\nlet s:FILE = SpaceVim#api#import('file')\n\n\n\"\"\n\" Set the global command name. If it is not set, will use $GTAGSGLOBAL, and if\n\" $GTAGSGLOBAL still is an empty string, then will use 'global'.\nlet g:gtags_global_command = get(g:, 'gtags_global_command',\n            \\ empty($GTAGSGLOBAL) ? 'global' : $GTAGSGLOBAL\n            \\ )\n\n\"\"\n\" Enable/Disable default mappings. By default it is disabled.\nlet g:gtags_auto_map = get(g:, 'gtags_auto_map', 0)\n\n\"\"\n\" This setting will open the |quickfix| list when adding entries. A value of 2 will\n\" preserve the cursor position when the |quickfix| window is\n\" opened. Defaults to 2.\nlet g:gtags_open_list = get(g:, 'gtags_open_list', 2)\n\n\" -- ctags-x format\n\" let Gtags_Result = \"ctags-x\"\n\" let Gtags_Efm = \"%*\\\\S%*\\\\s%l%\\\\s%f%\\\\s%m\"\n\"\n\" -- ctags format\n\" let Gtags_Result = \"ctags\"\n\" let Gtags_Efm = \"%m\\t%f\\t%l\"\n\"\n\" Gtags_Use_Tags_Format is obsoleted.\nif exists('g:Gtags_Use_Tags_Format')\n    let g:Gtags_Result = 'ctags'\n    let g:Gtags_Efm = \"%m\\t%f\\t%l\"\nendif\nif !exists('g:Gtags_Result')\n    let g:Gtags_Result = 'ctags-x'\nendif\nif !exists('g:Gtags_Efm')\n    let g:Gtags_Efm = \"%*\\\\S%*\\\\s%l%\\\\s%f%\\\\s%m\"\nendif\n\" Character to use to quote patterns and file names before passing to global.\n\" (This code was drived from 'grep.vim'.)\nif !exists('g:Gtags_Shell_Quote_Char')\n    if has('win32') || has('win16') || has('win95')\n        let g:Gtags_Shell_Quote_Char = '\"'\n    else\n        let g:Gtags_Shell_Quote_Char = \"'\"\n    endif\nendif\nif !exists('g:Gtags_Single_Quote_Char')\n    if has('win32') || has('win16') || has('win95')\n        let g:Gtags_Single_Quote_Char = \"'\"\n        let g:Gtags_Double_Quote_Char = '\\\"'\n    else\n        let s:sq = \"'\"\n        let s:dq = '\"'\n        let g:Gtags_Single_Quote_Char = s:sq . s:dq . s:sq . s:dq . s:sq\n        let g:Gtags_Double_Quote_Char = '\"'\n    endif\nendif\n\n\"\n\" Stack Object.\n\"\nfunction! s:Stack() abort\n    let l:this = {}\n    let l:this.container = []\n\n    function! l:this.push(item) abort\n        call add(self.container, a:item)\n    endfunction\n\n    function! l:this.pop() abort\n        if len(self.container) <= 0\n            throw 'Stack Empty'\n        endif\n\n        let l:item = self.container[-1]\n        unlet self.container[-1]\n\n        return l:item\n    endfunction\n\n    return l:this\nendfunction\n\nfunction! s:Memorize() abort\n    let l:data = {\n                \\'file': expand('%'),\n                \\'position': getpos('.'),\n                \\}\n    call s:crumbs.push(l:data)\nendfunction\n\nfunction! gtags#remind() abort\n    try\n        let l:data = s:crumbs.pop()\n    catch\n        call s:Error(v:exception)\n        return\n    endtry\n\n    execute 'e ' . l:data.file\n    call setpos('.', l:data.position)\nendfunction\n\nif ! exists('s:crumbs')\n    let s:crumbs = s:Stack()\nendif\n\n\"\n\" Display error message.\n\"\nfunction! s:Error(msg) abort\n    echohl WarningMsg |\n                \\ echomsg 'Error: ' . a:msg |\n                \\ echohl None\nendfunction\n\"\n\" Extract pattern or option string.\n\"\nfunction! s:Extract(line, target) abort\n    let l:option = ''\n    let l:pattern = ''\n    let l:force_pattern = 0\n    let l:length = strlen(a:line)\n    let l:i = 0\n\n    \" skip command name.\n    if a:line =~# '^Gtags'\n        let l:i = 5\n    endif\n    while l:i < l:length && a:line[l:i] ==# ' '\n        let l:i = l:i + 1\n    endwhile\n    while l:i < l:length\n        if a:line[l:i] ==# '-' && l:force_pattern == 0\n            let l:i = l:i + 1\n            \" Ignore long name option like --help.\n            if l:i < l:length && a:line[l:i] ==# '-'\n                while l:i < l:length && a:line[l:i] !=# ' '\n                    let l:i = l:i + 1\n                endwhile\n            else\n                let l:c = ''\n                while l:i < l:length && a:line[l:i] !=# ' '\n                    let l:c = a:line[l:i]\n                    let l:option = l:option . l:c\n                    let l:i = l:i + 1\n                endwhile\n                if l:c ==# 'e'\n                    let l:force_pattern = 1\n                endif\n            endif\n        else\n            let l:pattern = ''\n            \" allow pattern includes blanks.\n            while l:i < l:length\n                if a:line[l:i] ==# \"'\"\n                    let l:pattern = l:pattern . g:Gtags_Single_Quote_Char\n                elseif a:line[l:i] ==# '\"'\n                    let l:pattern = l:pattern . g:Gtags_Double_Quote_Char\n                else\n                    let l:pattern = l:pattern . a:line[l:i]\n                endif\n                let l:i = l:i + 1\n            endwhile\n            if a:target ==# 'pattern'\n                return l:pattern\n            endif\n        endif\n        \" Skip blanks.\n        while l:i < l:length && a:line[l:i] ==# ' '\n            let l:i = l:i + 1\n        endwhile\n    endwhile\n    if a:target ==# 'option'\n        return l:option\n    endif\n    return ''\nendfunction\n\n\"\n\" Trim options to avoid errors.\n\"\nfunction! s:TrimOption(option) abort\n    let l:option = ''\n    let l:length = strlen(a:option)\n    let l:i = 0\n\n    while l:i < l:length\n        let l:c = a:option[l:i]\n        if l:c !~# '[cenpquv]'\n            let l:option = l:option . l:c\n        endif\n        let l:i = l:i + 1\n    endwhile\n    return l:option\nendfunction\n\n\"\n\" Execute global and load the result into quickfix window.\n\"\nfunction! s:ExecLoad(option, long_option, pattern) abort\n    \" Execute global(1) command and write the result to a temporary file.\n    let l:isfile = 0\n    let l:option = ''\n    let l:result = ''\n\n    if a:option =~# 'f'\n        let l:isfile = 1\n        if filereadable(a:pattern) == 0\n            call s:Error('File ' . a:pattern . ' not found.')\n            return\n        endif\n    endif\n    if a:long_option !=# ''\n        let l:option = a:long_option . ' '\n    endif\n    \" if s:version[0] > 6 || (s:version[0] == 6 && s:version[1] >= 5)\n        \" let l:option = l:option . '--nearness=' . expand('%:p:h') . ' '\n    \" endif\n    let l:option = l:option . '--result=' . g:Gtags_Result . ' -q'\n    let l:option = l:option . s:TrimOption(a:option)\n    if l:isfile == 1\n        let l:cmd = g:gtags_global_command . ' ' . l:option . ' ' . g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char\n    else\n        let l:cmd = g:gtags_global_command . ' ' . l:option . 'e ' . g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char\n    endif\n\n    let l:restore_gtagsroot = 0\n    if empty($GTAGSROOT)\n      let $GTAGSROOT = SpaceVim#plugins#projectmanager#current_root()\n      let l:restore_gtagsroot = 1\n    endif\n\n    let l:restore_gtagsdbpath = 0\n    if empty($GTAGSDBPATH)\n      let $GTAGSDBPATH = s:FILE.unify_path(g:gtags_cache_dir) . s:FILE.path_to_fname($GTAGSROOT)\n      let l:restore_gtagsdbpath = 1\n    endif\n\n    let l:result = system(l:cmd)\n\n    \" restore $GTAGSROOT and $GTAGSDBPATH to make it possible to switch\n    \" between multiple projects or parent/child projects\n    if l:restore_gtagsroot\n      let $GTAGSROOT = ''\n    endif\n\n    if l:restore_gtagsdbpath\n      let $GTAGSDBPATH = ''\n    endif\n\n    e\n    if v:shell_error != 0\n        if v:shell_error == 2\n            call s:Error('invalid arguments. (gtags.vim requires GLOBAL 5.7 or later)')\n        elseif v:shell_error == 3\n            call s:Error('GTAGS not found.')\n        else\n            call s:Error('global command failed. command line: ' . l:cmd)\n        endif\n        return\n    endif\n    if l:result ==# ''\n        if a:option =~# 'f'\n            call s:Error('No tags found in ' . a:pattern)\n        elseif a:option =~# 'P'\n            call s:Error('No path matches found for ' . a:pattern)\n        elseif a:option =~# 'g'\n            call s:Error('No line matches found for ' . a:pattern)\n        else\n            call s:Error('No tag matches found for ' . g:Gtags_Shell_Quote_Char . a:pattern . g:Gtags_Shell_Quote_Char)\n        endif\n        return\n    endif\n\n    call s:Memorize()\n\n    \" Open the quickfix window\n    if g:gtags_open_list == 1\n        botright copen\n    elseif g:gtags_open_list == 2\n        call s:save_prev_windows()\n        botright copen\n        call s:restore_prev_windows()\n    endif\n    \" Parse the output of 'global -x or -t' and show in the quickfix window.\n    let l:efm_org = &efm\n    let &efm = g:Gtags_Efm\n    cexpr! l:result\n    let &efm = l:efm_org\nendfunction\n\nlet s:prev_windows = []\nfunction! s:save_prev_windows() abort\n    let aw = winnr('#')\n    let pw = winnr()\n    if exists('*win_getid')\n        let aw_id = win_getid(aw)\n        let pw_id = win_getid(pw)\n    else\n        let aw_id = 0\n        let pw_id = 0\n    endif\n    call add(s:prev_windows, [aw, pw, aw_id, pw_id])\nendfunction\n\nfunction! s:restore_prev_windows() abort\n    let [aw, pw, aw_id, pw_id] = remove(s:prev_windows, 0)\n    if winnr() != pw\n        \" Go back, maintaining the '#' window (CTRL-W_p).\n        if pw_id\n            let aw = win_id2win(aw_id)\n            let pw = win_id2win(pw_id)\n        endif\n        if pw\n            if aw\n                exec aw . 'wincmd w'\n            endif\n            exec pw . 'wincmd w'\n        endif\n    endif\nendfunction\n\n\"\n\" RunGlobal()\n\"\nfunction! gtags#global(line) abort\n    call gtags#logger#log('info', a:line)\n    let l:pattern = s:Extract(a:line, 'pattern')\n\n    if l:pattern ==# '%'\n        let l:pattern = expand('%')\n    elseif l:pattern ==# '#'\n        let l:pattern = expand('#')\n    endif\n    let l:option = s:Extract(a:line, 'option')\n    \" If no pattern supplied then get it from user.\n    if l:pattern ==# '' && l:option !=# 'P'\n        let s:option = l:option\n        if l:option =~# 'f'\n            let l:line = input('Gtags for file: ', expand('%'), 'file')\n        else\n            let l:line = input('Gtags for pattern: ', expand('<cword>'), 'custom,GtagsCandidateCore')\n        endif\n        let l:pattern = s:Extract(l:line, 'pattern')\n        if l:pattern ==# ''\n            call s:Error('Pattern not specified.')\n            return\n        endif\n    endif\n    call s:ExecLoad(l:option, '', l:pattern)\nendfunction\n\n\"\n\" Execute RunGlobal() depending on the current position.\n\"\nfunction! gtags#cursor() abort\n    let l:pattern = expand('<cword>')\n    let l:option = \"--from-here=\\\"\" . line('.') . ':' . expand('%') . \"\\\"\"\n    call s:ExecLoad('', l:option, l:pattern)\nendfunction\n\n\"\n\" Core Gtags function\n\"\nfunction! gtags#func(type, pattern) abort\n    let l:option = ''\n    if a:type ==# 'g'\n        let l:option .= ' -x '\n    elseif a:type ==# 'r'\n        let l:option .= ' -x -r '\n    elseif a:type ==# 's'\n        let l:option .= ' -x -s '\n    elseif a:type ==# 'e'\n        let l:option .= ' -x -g '\n    elseif a:type ==# 'f'\n        let l:option .= ' -x -P '\n    endif\n    call s:ExecLoad('', l:option, a:pattern)\nendfunction\n\n\"\n\" Show the current position on mozilla.\n\" (You need to execute htags(1) in your source directory.)\n\"\nfunction! gtags#gozilla() abort\n    let l:lineno = line('.')\n    let l:filename = expand('%')\n    call system('gozilla +' . l:lineno . ' ' . l:filename)\nendfunction\n\n\"\n\" Custom completion.\n\"\nfunction! gtags#complete(lead, line, pos) abort\n    let s:option = s:Extract(a:line, 'option')\n    return s:GtagsCandidateCore(a:lead, a:line, a:pos)\nendfunction\n\nfunction! s:GtagsCandidateCore(lead, ...) abort\n    if s:option ==# 'g'\n        return ''\n    elseif s:option ==# 'f'\n        if isdirectory(a:lead)\n            if a:lead =~# '/$'\n                let l:pattern = a:lead . '*'\n            else\n                let l:pattern = a:lead . '/*'\n            endif\n        else\n            let l:pattern = a:lead . '*'\n        endif\n        return glob(l:pattern)\n    else\n        let l:cands = system(g:gtags_global_command . ' ' . '-c' . s:option . ' ' . a:lead)\n        if v:shell_error == 0\n            return l:cands\n        endif\n        return ''\n    endif\nendfunction\n\nfunction! gtags#show_lib_path() abort\n    echo $GTAGSLIBPATH\nendfunction\n\nfunction! gtags#add_lib(path) abort\n    let $GTAGSLIBPATH .= ':'.a:path\n    echo $GTAGSLIBPATH\nendfunction\n\nlet s:progress = 0\n\nfunction! gtags#update(single_update) abort\n    let dir = s:FILE.unify_path(g:gtags_cache_dir) \n                \\ . s:FILE.path_to_fname(SpaceVim#plugins#projectmanager#current_root())\n    let cmd = ['gtags']\n    if !empty(g:gtags_gtagslabel)\n        let cmd += ['--gtagslabel=' . g:gtags_gtagslabel]\n    endif\n    if a:single_update && filereadable(dir . '/GTAGS')\n        let cmd += ['--single-update', expand('%:p')]\n    else\n        let cmd += ['--skip-unreadable']\n    endif\n    if !isdirectory(dir)\n        call mkdir(dir, 'p')\n    endif\n    let cmd += ['-O', dir]\n    let s:progress = s:JOB.start(cmd, {'on_exit' : funcref('s:on_update_exit')})\nendfunction\n\nfunction! s:on_update_exit(...) abort\n    let s:progress = 0\n    if str2nr(a:2) > 0 && !g:gtags_silent\n        echohl WarningMsg\n        echo 'failed to update gtags, exit data: ' . a:2\n        echohl None\n    endif\nendfunction\n\n"
  },
  {
    "path": "doc/gtags.txt",
    "content": "*gtags.txt*\tgtags in vim\nspacevim.org                                                           *gtags*\n\n==============================================================================\nCONTENTS                                                      *gtags-contents*\n  1. Introduction................................................|gtags-intro|\n  2. Configuration..............................................|gtags-config|\n  3. Commands.................................................|gtags-commands|\n\n==============================================================================\nINTRODUCTION                                                     *gtags-intro*\n\nThe gtags.vim plug-in script integrates the GNU GLOBAL source code tag system\nwith Vim. About the details, see http://www.gnu.org/software/global/.\n\n==============================================================================\nCONFIGURATION                                                   *gtags-config*\n\n                                                      *g:gtags_global_command*\nSet the global command name. If it is not set, will use $GTAGSGLOBAL, and if\n$GTAGSGLOBAL still is an empty string, then will use 'global'.\n\n                                                            *g:gtags_auto_map*\nEnable/Disable default mappings. By default it is disabled.\n\n                                                           *g:gtags_open_list*\nThis setting will open the |quickfix| list when adding entries. A value of 2\nwill preserve the cursor position when the |quickfix| window is opened.\nDefaults to 2.\n\n                                                            *g:gtags_log_file*\nset the path to gtags log file.\n\n==============================================================================\nCOMMANDS                                                      *gtags-commands*\n\n:Gtags                                                                *:Gtags*\n  General form of Gtags command is as follows:\n>\n      :Gtags [option] pattern\n\n<\n  To go to func, you can say\n>\n      :Gtags func\n\n<\n  Input completion is available. If you forgot function name but recall only\n  some characters of the head, please input them and press <TAB> key.\n>\n      :Gtags fu<TAB>\n      :Gtags func                     \" Vim will append 'nc'.\n\n<\n  If you omitted argument, vim ask it like this:\n>\n      Gtags for pattern: <current token>\n\n<\n  Vim execute `global -x main', parse the output, list located objects in\n  quickfix window and load the first entry.  The quickfix windows is like\n  this:\n>\n      gozilla/gozilla.c|200| main(int argc, char **argv)\n      gtags-cscope/gtags-cscope.c|124| main(int argc, char **argv)\n      gtags-parser/asm_scan.c|2056| int main()\n      gtags-parser/gctags.c|157| main(int argc, char **argv)\n      gtags-parser/php.c|2116| int main()\n      gtags/gtags.c|152| main(int argc, char **argv)\n      [Quickfix List]\n\n<\n  You can go to any entry using quickfix command.\n\n  :cn     go to the next entry.\n\n  :cp     go to the previous entry.\n\n  :cc{N}     go to the {N}th entry.\n\n  :cl     list all entries.\n\n  You can see the help of quickfix like this:\n>\n      :h quickfix\n\n<\n  You can use POSIX regular expression too. It requires more execution time\n  though.\n>\n      :Gtags ^[sg]et_\n\n<\n  It will match to both of 'set_value' and 'get_value'.\n\n  To go to the referenced point of func, add -r option.\n>\n      :Gtags -r func\n\n<\n  To go to any symbols which are not defined in GTAGS, try this.\n>\n      :Gtags -s func\n\n<\n  To go to any string other than symbol, try this.\n>\n      :Gtags -g ^[sg]et_\n\n<\n  This command accomplishes the same function as grep(1) but is more\n  convenient because it retrieves the entire directory structure.\n\n  To get list of objects in a file 'main.c', use -f command.\n>\n      :Gtags -f main.c\n\n<\n  If you are editing `main.c' itself, you can use '%' instead.\n>\n      :Gtags -f %\n\n<\n  You can browse project files whose path includes specified pattern. For\n  example:\n>\n      :Gtags -P /vm/                  <- all files under 'vm' directory.\n      :Gtags -P \\.h$                  <- all include files.\n      :Gtags -P init                  <- all paths includes 'init'\n\n<\n  If you omitted the argument and input only <ENTER> key to the prompt, vim\n  shows list of all files in your project.\n\n  You can use all options of `global(1)` except for the -c, -p, -u and all\n  long name options. They are sent to `global(1)` as is. For example, if you\n  want to ignore case distinctions in pattern.\n>\n      :Gtags -gi paTtern\n\n<\n  It will match to both of `PATTERN` and `pattern`.\n\n  If you want to search a pattern which starts with a hyphen like '-C' then\n  you can use the -e option like `grep(1)`.\n>\n      :Gtags -ge -C\n\n<\n  By default, Gtags command search only in source files. If you want to search\n  in both source files and text files, or only in text files then\n>\n      :Gtags -go pattern              # both source and text\n      :Gtags -gO pattern              # only text file\n\n<\n  See `global(1)` for other options.\n\n:GtagsCursor                                                    *:GtagsCursor*\n  The GtagsCursor command brings you to the definition or reference of the\n  current token.\n>\n      :GtagsCursor\n<\n\n:GtagsRemind                                                    *:GtagsRemind*\n  Use GtagsRemind command to jump to the previous position from where you\n  invoked `:Gtags`.\n>\n    \":GtagsRemind\n<\n\n:GtagsGenerate[!] {bang}                                      *:GtagsGenerate*\n  Update gtags for current file, with a {bang}, will update the project's\n  gtags database.\n\n\nvim:tw=78:ts=8:ft=help:norl:\n"
  },
  {
    "path": "plugin/gtags.vim",
    "content": "\"\"\n\" @section Introduction, intro\n\" The gtags.vim plug-in script integrates the GNU GLOBAL source code tag\n\" system with Vim. About the details, see http://www.gnu.org/software/global/.\n\nscriptencoding utf-8\n\nif !exists('g:gtags_cache_dir')\n    let g:gtags_cache_dir = '~/.cache/SpaceVim/tags/'\nendif\n\n\nif !exists('g:gtags_gtagslabel')\n    let g:gtags_gtagslabel = ''\nendif\n\n\nif !exists('g:gtags_auto_update')\n    let g:gtags_auto_update = 1\nendif\n\n\nif !exists('g:gtags_silent')\n    let g:gtags_silent = 1\nendif\n\n\n\"\"\n\" General form of Gtags command is as follows:\n\" >\n\"     :Gtags [option] pattern\n\"\n\" To go to func, you can say\n\" >\n\"     :Gtags func\n\"\n\" Input completion is available. If you forgot function name but recall\n\" only some characters of the head, please input them and press <TAB> key.\n\" >\n\"     :Gtags fu<TAB>\n\"     :Gtags func                     \" Vim will append 'nc'.\n\"\n\" If you omitted argument, vim ask it like this:\n\" >\n\"     Gtags for pattern: <current token>\n\"\n\" Vim execute `global -x main', parse the output, list located\n\" objects in quickfix window and load the first entry.  The quickfix\n\" windows is like this:\n\" >\n\"     gozilla/gozilla.c|200| main(int argc, char **argv)\n\"     gtags-cscope/gtags-cscope.c|124| main(int argc, char **argv)\n\"     gtags-parser/asm_scan.c|2056| int main()\n\"     gtags-parser/gctags.c|157| main(int argc, char **argv)\n\"     gtags-parser/php.c|2116| int main()\n\"     gtags/gtags.c|152| main(int argc, char **argv)\n\"     [Quickfix List]\n\"\n\" You can go to any entry using quickfix command.\n\"\n\" :cn\n\"     go to the next entry.\n\"\n\" :cp\n\"     go to the previous entry.\n\"\n\" :cc{N}\n\"     go to the {N}th entry.\n\"\n\" :cl\n\"     list all entries.\n\"\n\" You can see the help of quickfix like this:\n\" >\n\"     :h quickfix\n\"\n\" You can use POSIX regular expression too. It requires more execution time though.\n\" >\n\"     :Gtags ^[sg]et_\n\"\n\" It will match to both of 'set_value' and 'get_value'.\n\"\n\" To go to the referenced point of func, add -r option.\n\" >\n\"     :Gtags -r func\n\"\n\" To go to any symbols which are not defined in GTAGS, try this.\n\" >\n\"     :Gtags -s func\n\"\n\" To go to any string other than symbol, try this.\n\" >\n\"     :Gtags -g ^[sg]et_\n\"\n\" This command accomplishes the same function as grep(1) but is more convenient\n\" because it retrieves the entire directory structure.\n\"\n\" To get list of objects in a file 'main.c', use -f command.\n\" >\n\"     :Gtags -f main.c\n\"\n\" If you are editing `main.c' itself, you can use '%' instead.\n\" >\n\"     :Gtags -f %\n\"\n\" You can browse project files whose path includes specified pattern.\n\" For example:\n\" >\n\"     :Gtags -P /vm/                  <- all files under 'vm' directory.\n\"     :Gtags -P \\.h$                  <- all include files.\n\"     :Gtags -P init                  <- all paths includes 'init'\n\"\n\" If you omitted the argument and input only <ENTER> key to the prompt,\n\" vim shows list of all files in your project.\n\"\n\" You can use all options of `global(1)` except for the -c, -p, -u and\n\" all long name options. They are sent to `global(1)` as is.\n\" For example, if you want to ignore case distinctions in pattern.\n\" >\n\"     :Gtags -gi paTtern\n\"\n\" It will match to both of `PATTERN` and `pattern`.\n\"\n\" If you want to search a pattern which starts with a hyphen like '-C'\n\" then you can use the -e option like `grep(1)`.\n\" >\n\"     :Gtags -ge -C\n\"\n\" By default, Gtags command search only in source files. If you want to\n\" search in both source files and text files, or only in text files then\n\" >\n\"     :Gtags -go pattern              # both source and text\n\"     :Gtags -gO pattern              # only text file\n\"\n\" See `global(1)` for other options.\ncommand! -nargs=* -complete=custom,gtags#complete Gtags call gtags#global(<q-args>)\n\n\"\"\n\" The GtagsCursor command brings you to the definition or reference of\n\" the current token.\n\" >\n\"     :GtagsCursor\n\" <\ncommand! -nargs=0 GtagsCursor call gtags#cursor()\n\n\"\"\n\" Use GtagsRemind command to jump to the previous position from where you\n\" invoked `:Gtags`.\n\" >\n\"   \":GtagsRemind\n\" <\ncommand! -nargs=0 GtagsRemind call gtags#remind()\n\n\"\"\n\" Update gtags for current file, with a {bang}, will update the project's\n\" gtags database.\ncommand! -nargs=0 -bang GtagsGenerate call gtags#update(<bang>1)\n\nif g:gtags_auto_update == 1\n    augroup gtags_core\n        autocmd!\n        au BufWritePost * call gtags#update(1)\n    augroup END\nendif\n\n\n\n"
  }
]