Sublime Forum

API Requests

#1

I’ve been working on some plugins lately, and I’d like to request a couple of features in the API that I would find really useful:

  1. A way to get a list of all open tabs. The plugin I finished today absolutely needs this (Save and Reopen Untitled Tabs). While it does mostly work without this feature, it would be awesome if there was a way to get a list of the view objects.

  2. An event that fires when the editor starts up. I ran into a problem in which I was trying to do too much in the constructor of my EventListener. I worked around it with a little set_timeout, but that’s ugly, an event would be nicer.

  3. Buffer version number. Internally, E kept a small version number for each file that was incremented each time there was a change to the file. This allowed plugins and such to easily check if a specific file had been modified. That would be really nice to have.

  4. Something to manipulate the tab order and set which tab has focus. Or rather, window.new_file() should optionally accept an index which is the location to open the tab at.

0 Likes

#2
  1. An onScroll or an onViewportChanged api would be nice, but it’s not a huge necessity, a simple timer can work around it. (on_selection_modified fires if the arrow keys or page down cause the viewport to scroll, but it does not fire if the scrollbar or mousewheel cause the viewport to move).
1 Like

#3

Sorry to dig up an old thread, but I’m now in need of two of these requests - onScroll / onViewportPositionChanged, plus an event that fires when the application boots. I’m trying to implement the live-py-plugin for live coding, and being able to keep two windows’ scroll positions in sync is necessary for a good experience. I’m trying to use a timeout in the interim.

0 Likes