{"id":19078983,"url":"https://github.com/tomtom/trag_vim","last_synced_at":"2025-04-30T05:23:33.860Z","repository":{"id":1023615,"uuid":"851553","full_name":"tomtom/trag_vim","owner":"tomtom","description":"A language-aware source code scanner (with support for git grep, ack, ag, sift ...)","archived":false,"fork":false,"pushed_at":"2019-01-31T08:26:56.000Z","size":273,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T20:49:52.401Z","etag":null,"topics":["ack","ag","grep","vim","vim-plugin","viml"],"latest_commit_sha":null,"homepage":"http://www.vim.org/scripts/script.php?script_id=2033","language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomtom.png","metadata":{"files":{"readme":"README","changelog":"CHANGES.TXT","contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-08-20T16:27:57.000Z","updated_at":"2019-01-31T08:26:57.000Z","dependencies_parsed_at":"2022-08-16T11:50:29.707Z","dependency_job_id":null,"html_url":"https://github.com/tomtom/trag_vim","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Ftrag_vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Ftrag_vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Ftrag_vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomtom%2Ftrag_vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomtom","download_url":"https://codeload.github.com/tomtom/trag_vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251646270,"owners_count":21620903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ack","ag","grep","vim","vim-plugin","viml"],"created_at":"2024-11-09T02:12:58.291Z","updated_at":"2025-04-30T05:23:33.820Z","avatar_url":"https://github.com/tomtom.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"This plugin uses ad-hoc searches to find strings in files. For certain \nlanguages, it can also find variable/function/class definitions, \nfunction calls etc.\n\nOther than |tags| or |cscope|, it doesn't build a database to speed up \nsearches but always scans all files. It can make use of the following \nexternal tools in order to gain acceptable performance for medium-sized \nprojects:\n\n    - `git grep`\n    - `ack` http://beyondgrep.com/\n    - `ag` https://github.com/ggreer/the_silver_searcher\n    - `sift` https://sift-tool.org/\n\nThe builtin vimscript-based version file scanner and also \n|vimgrep| are suitable for small projects. See |g:trag#grep_type| for \navailable options.\n\n\nUsage~\n\nFirst, define which files belong to your project. See \n|g:trag#file_sources| for available sources. If the variable contains \n\"vcs\" and the current buffer is under control of a supported VCS, trag \nwill scan the files in the VCS. Maybe your project's source files are \nalready registered in your tags files, in which case those will be used.\n\nSecondly, use |:Trag| to scan your project's files. You can restrict searches \nto certain \"kinds\" like only variable definitions or only function calls. See \n|trag-kinds| for details.\n\nYou can also type \u003cLeader\u003er# to search for the word under cursor (see \n|g:trag_map_leader| and |TragInstallMap()| for details on maps). In \nsupported filetypes, \u003cLeader\u003erd will search for the definition of the \nword under cursor.\n\nCurrently the following filetypes are supported:\n\n    - java\n    - javascript\n    - json\n    - make\n    - r\n    - ruby\n    - viki\n    - vim\n\nRun `:echo globpath(\u0026rtp, 'ftplugin/*/trag.vim')` to get a full listing \nof supported filetypes.\n\nNOTE: Some kinds are available only for a subset of known filetypes.\n\nDefault maps (see also |TragInstallMap()|):\n\n    \u003cLeader\u003err ... Trag the word under cursor\n    \u003cLeader\u003erq ... Show |quickfix|list via |:Tragcw|\n    \u003cLeader\u003erl ... Show |location-list| via |:Traglw|\n    \u003cLeader\u003erf ... Edit a file from the files list, i.e. the list that would be \n                   used if no \"--file_sources\" argument were passed to \n                   |:Trag|\n    \u003cLeader\u003er\u003cLeader\u003ex ... The same as `:Trag -l -i=x -x=i \u003ccword\u003e\u003ccr\u003e`\n                   where x is a alphabetical letter that describes a kind in \n                   |g:trag_kinds| and \u003ccword\u003e is the word under cursor.\n                   \"-x=i\" (exclude commented text) is only added if kind x is \n                   in |g:trag_kinds_ignored_comments|.\n\n\n-----------------------------------------------------------------------\nInstall~\n\nEdit the vba file and type: \u003e\n\n    :so %\n\nSee :help vimball for details. If you have difficulties or use vim 7.0, \nplease make sure, you have the current version of vimball (vimscript \n#1502) installed.\n\nThis script requires tlib (vimscript #1863) to be installed.\n\n\n-----------------------------------------------------------------------\n                                                    *trag-kinds*\nKinds~\n\nCertain commands take a \"kind\" as argument. A \"kind\" in the context of \ntrag means a way how the expression is interpreted and (in the future) \nhow the lines are scanned. The meaning of the letter is specific for a \ncertain filetype. In general, the following list should serve as a \ncommon base:\n\n    c ... class definitions\n    d ... function/method definitions\n    f ... function calls\n    i ... ignored lines, comments etc.\n    l ... variable definition\n    m ... module definitions\n    r ... variable assignment (e.g. \"= WORD\")\n    u ... uses of word (ignore comments)\n    w ... find as word\n    x ... subclasses\n\n    fuzzy ... use a typo-tolerant regexp\n    todo  ... TODO markers etc.\n\nEXPERIMENTAL: Kinds can be joined as comma-separated list (OR) of \nperiod-seprated list (CONTAIN). This may be unintuitive but that's the \nway it is. Order in CONTAIN-patterns matters, i.e. w.i doesn't make too \nmuch sense (a word that CONTAINs a comment, which could only be the word \nitself) but i.w does (a comment that CONTAINs a word, which is quite \npossible).\n\nThe available command-line options are documented in |:Trag|. These \ncommand-line options allow users to defined which lines should be matched.\n\nExample:\n    -i=l,r ...... a word either on the left OR right hand side of an \n                  assignment\n    -x=i ........ match lines that are not comments\n    -i=w -x=i ... word that is NOT contained in a comment\n\nMore examples:\n    File contents: \u003e\n        #1 function Foo() {}\n        #2 function FooBar() {}\n        #3 let x = FooBar()\n        #4 let x = Foo()\n\u003c\n    :TRag Foo\n    =\u003e Find \"Foo\": 1-4\n\n    :TRag -i=w Foo\n    =\u003e Find the __w__ords \"Foo\": 1, 4\n\n    :TRag -i=d Foo\n    =\u003e Find __d__efinitions of \"Foo\": 1, 2\n\n    :TRag -i=d.w Foo\n    =\u003e Find __d__efinitions of the __w__ord \"Foo\": 1\n\n    :TRag -i=f Foo\n    =\u003e Find (__f__unction) calls of \"Foo\": 3, 4\n\n    :TRag -i=f.w Foo\n    =\u003e Find (__f__unction) calls of the __w__ord \"Foo\": 4\n\n\nNot every kind is defined for every filetype. Currenty, support for \nthe following filetype(s) is somewhat above average:\n    - ruby\n    - vim\n\nUse |:TRagDefKind| to define new kinds.\n\nSee |trag#Grep()| for details of how to use this.\n\n\n-----------------------------------------------------------------------\nInstall~\n\nTo install the vimball, edit the vba file and type: \u003e\n\n    :so %\n\nSee :help vimball for details.\n\nTo install from github, please use\n    1. git + a plugin loader like enable_vim, pathogen, vim-unbundle etc.\n    2. a plugin manager like VAM, Vundle, NeoBundle, vim-plug etc.\n\nThe tlib_vim plugin is required:\nhttps://github.com/tomtom/tlib_vim\n\nAlso available via git: http://github.com/tomtom/trag_vim\n\n\n\n\nDependencies:\n  tlib (\u003e= 1.23) :: http://github.com/tomtom/tlib_vim\n\nLicense: GPLv3 or later\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom%2Ftrag_vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomtom%2Ftrag_vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomtom%2Ftrag_vim/lists"}