RUSTY-TAGS(1)
π¦ RUSTY-TAGS(1) π¦
okay so bestie, gather round, because this is the general commands manual page for rusty-tags and it's genuinely one of my faves π it's giving "I make your code navigable" and honestly? iconic.
β¨ NAME β¨
rusty-tags β creates ctags/etags for a cargo project π
β¨ SYNOPSIS β¨
rusty-tags [options] tags_kind
πΈ DESCRIPTION πΈ
So basically, rusty-tags creates tags for source code navigation using ctags, and it does this for a cargo(1) project, all of its direct and indirect dependencies, and the Rust standard library. no cap. π«Ά
You can run it literally anywhere inside a cargo project, she's flexible like that.
rusty-tags creates a rusty-tags.vi file (if tags_kind is vi) or a rusty-tags.emacs file (if tags_kind is emacs) right beside the Cargo.toml file. π
Tags are also generated for every dependency. and if a dependency reexports parts of its own dependencies? then those reexported parts are also contained in the tags file of that dependency. we love a thorough queen β¨
Tags for the standard library are created if the path to the Rust source is supplied by defining the environment variable RUST_SRC_PATH. that's the vibe check right there π
π OPTIONS π
-f,--force-recreateβ forces the recreation of the tags of all dependencies and the Rust standard library. it's giving "start over, we're doing this fresh" π₯-h,--helpβ prints help information.-n,--num-threads=numβ sets the number of threads used for the tags creation. default is the number of available physical cpus π-o,--omit-depsβ do not generate tags for dependencies. (skipping the deps, bold move but okay)-O,--output=filenameβ sets the name of the output tags file. default:rusty-tags.viiftags_kindisvi, orrusty-tags.emacsiftags_kindisemacs.-q,--quietβ do not output anything but errors. π€«-s,--start-dir=dirβ sets the start directory for the search of theCargo.tomlfile. default is the current working directory.-V,--versionβ prints version information.-v,--verboseβ enable verbose output about all operations. she's telling you everything π£οΈ
π CONFIGURATION π
π rusty-tags configuration π
rusty-tags reads the configuration file ~/.rusty-tags/config.toml. it supports these settings:
vi_tagsβ the file name used for vi tags. default:rusty-tags.vi.emacs_tagsβ the file name used for emacs tags. default:rusty-tags.emacs.ctags_exeβ the name or path to thectags(1)executable. default:ctags,exuberant-ctags,exctags,universal-ctags,uctagsare tried in that order. (yes, in that order, bestie, don't shuffle them π)ctags_optionsβ the options given to thectags(1)executable. default: none.
π§ vim configuration π§
To use the generated tag files with vim, add the following to your vimrc file:
autocmd BufRead *.rs :setlocal tags=./rusty-tags.vi;/
autocmd BufWritePost *.rs :silent! exec "!rusty-tags vi --quiet --start-dir=" . expand('%:p:h') . "&" | redraw!
The first line ensures that vim will automatically search for a rusty-tags.vi file upwards the directory hierarchy. this setting is important if you want to jump to dependencies and then further jump to their dependencies. literally essential, don't skip it π«Ά
The second line ensures that your project's tag file gets updated if a file is written. auto-refresh? we stan β
If you have set the path to the Rust source code in the RUST_SRC_PATH environment variable, use this setting instead:
autocmd BufRead *.rs :setlocal tags=./rusty-tags.vi;/,$RUST_SRC_PATH/rusty-tags.vi
π ENVIRONMENT π
RUST_SRC_PATHβ the path to the source code of the Rust standard library to generate tags for.
π FILES π
~/.rusty-tags/config.tomlβ the configuration file forrusty-tags(see the Configuration section above, bestie, it's all there).
β SEE ALSO β
and that's the whole page, no notes π this beauty is from the general commands manual, dated 2019-01-25, and honestly it aged like fine wine. go make some tags, you main character πβ¨π¦π
π¦ where this page comes from
- debian bookworm: rusty-tags 3.5.1-4+b2 Β· BSD-3-Clause
- debian trixie: rusty-tags 3.10.0-1+b7 Β· BSD-3-Clause
- ubuntu jammy: rusty-tags 3.5.1-3 Β· BSD-3-Clause
- ubuntu noble: rusty-tags 3.10.0-1 Β· BSD-3-Clause
- ubuntu questing: rusty-tags 3.10.0-1build1
- ubuntu resolute: rusty-tags 3.11.0-1 Β· BSD-3-Clause
- ubuntu stonking: rusty-tags 3.11.0-1 Β· BSD-3-Clause
- Copyright 2019 Robin Krahl <robin.krahl@ireas.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms