Add script to generate tags for CDDA json data #37877
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Infrastructure "Add script to generate tags for CDDA json data for easier navigation in standard text editors"
Purpose of change
When working with the CDDA json data it can be somewhat overwhelming. It's not always obvious where to look for the definition of a particular item, or mapgen palette, etc.
Describe the solution
This is a special case of an already-solved problem.
tags
files were invented to navigate source code, and we can use the same format to navigate the json.This PR adds a script to update a
tags
file with suitable data to allow one to easily jump to a particular json definition using standard text editor commands for interacting with tags (e.g. in VimCtrl-]
).So, for example, when looking at a particular piece of mapgen you can jump to its palette definition with a single command.
(Also, fixed an unrelated typo in
keys.py
)Testing
Experimented with jumping around in Vim.
Additional context
I realised how useful this would be while working on #37839.