Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to generate tags for CDDA json data #37877

Merged
merged 2 commits into from
Feb 10, 2020

Conversation

jbytheway
Copy link
Contributor

@jbytheway jbytheway commented Feb 10, 2020

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 Vim Ctrl-]).

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.

This is a tool to augment a tags file with CDDA json tags, to allow for
easier navigation of the CDDA game data via standard text-editor
support.

For more on the tags file format:

http://ctags.sourceforge.net/FORMAT
@ifreund ifreund added the [Python] Code made in Python label Feb 10, 2020
@ZhilkinSerg ZhilkinSerg merged commit 901eb71 into CleverRaven:master Feb 10, 2020
@jbytheway jbytheway deleted the cdda_tags branch February 12, 2020 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Python] Code made in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants