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

Request: show equation numbers with reference completion #1478

Open
carlmueller opened this issue Jul 6, 2020 · 0 comments
Open

Request: show equation numbers with reference completion #1478

carlmueller opened this issue Jul 6, 2020 · 0 comments

Comments

@carlmueller
Copy link

I have a suggestion about \ref and \eqref completion. Why not use the .aux file to list the equation number along with the key? It would be much easier, and I never understood why standard packages don't do this. I'm attaching a vim function that I wrote to show you what I mean, along with a screenshot. Of course users would have to compile to generate an aux file, but most people do that constantly to see the current latex output. If the reference hasn't been compiled yet, the key could appear without an equation number.

To use the attached plugin, open a .tex file in vim, preferably one that already has several equation labels. Then source the plugin with ":source tab.vim" (after deleting the .txt ending). Next type \ref{ and you will see automatic completion to \ref{} with the cursor between the brackets. Pressing the tab key will create a split window with equations and keys listed. Moving to the desired equation number and pressing "enter" will close the split window and copy the key to \ref{}.

Screen Shot 2020-07-06 at 9 28 31 AM

[tab.vim.txt](https://github.com/SublimeText/LaTeXTools/files/4879229/tab.vim.txt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant