ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Sphinx Ref Helper

by intelkevinputnam ST3 New

Plugin for Sublime Text 3 that searches all docs in folder for Sphinx references and auto generates :ref:`` in current doc

Labels sphinx

Details

Installs

  • Total 8
  • Win 6
  • OS X 1
  • Linux 1
Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6
Windows 0 0 0 1 1 1 1 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
OS X 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

Sphinx Ref Helper

https://img.shields.io/badge/License-Apache%202.0-blue.svg

This plugin works with Sublime Text 3. It searches the first open folder in any given Sublime Text 3 window for Sphinx internal doc references labels. It displays each one it finds (along with the file it was found in) in the quick panel. If you select one (either by clicking or hitting enter) it will insert the correct :ref:`` in the document you are editing at the current cursor location. Note that this plugin stands alone and does not require Sphinx to be installed or the documenation to have been built.

images/sphinx-ref-help-screenshot.png

I recommend having just one Sphinx documentation project folder open in any given window.

How to use it

  1. Open a Sphinx project using “Open Folder." If there is a conf.py, the plugin tries to check if there are "exclude patterns" to avoid.
  2. Put cursor where you want to insert :ref:``.
  3. Type (primary + 1 - "ctrl key" in Windows/Linux and "⌘ key" in MacOS).
  4. Select ref from the list to insert at current cursor location.

Manual installation

  1. Open Sublime Text 3.
  2. Go to “Preferences” and click “Browse Packages.”
  3. Double click on the “User” directory.
  4. Drop both files in the “User” directory.

Limitations

This plugin was created to help me work with Sphinx documentation projects that I might not already be familiar with. As such, it is meant for convenience and is a work in progress.

  • Try to open folders that contain just the Sphinx project. Opening the root directory of your system would be a bad idea and will probably hang Sublime Text. Don't try it, please.
  • Multiple folders open in the same window are going to be a problem, as the plugin is coded to look at only the first folder. It works for me, but it might not work for you. It seems to me that sharing refs between projects would probably be confusing anyway.
  • I put in some code to strip out http link refs. However, if your links split lines, they're going to show up in the list. Since many of these are only available from within the file in which they were created, be careful.
  • There are probably things that I missed. Feel free to help out.