4 ms·
In practice, the ST3 API is extremely limiting and poorly implemented. The docs are both lacking and dated (read incorrect). It is trivial to crash ST3 by mak
by kansface 13y ago
In practice, the ST3 API is extremely limiting and poorly implemented. The docs are both lacking and dated (read incorrect). It is trivial to crash ST3 by making the incorrect sequence of correct API calls. It is also common to resort to polling the editor to make up for other deficiencies. The API also only allows for extremely limited UI choices forcing highly unintuitive interfaces on end users. The ST3 runtime also features such gems as not shipping the ssl module on linux (while ST2 stripped out even more stuff).
I also expect NPM to be much better in practice than the sublime package manager which frequently ships broken code. JS is a better choice than python for async code which will make writing plugins easier.
Furthermore, ST is 3 people who largely ignore all feedback from the community regarding bugs and features. It won't be hard to out compete ST in the long run.
- chid 13y agoWhat do you mean polling the editor? Are there any examples of plugins that do that?
- kansface 13y agoI am a co-founder of floobits- https://floobits.com/about https://floobits.com/about. We build support for real time collaboration into existing editors. I chiefly work on our editor integrations. In terms of ease of development, the order goes like this: IntelliJ ~ Emacs > Sublime ~ Ace >> Vim. In terms of community and support, the former ordering is also true. POLLING: Here we are trying to get the Window, from the Sublime API. Sometimes it doesn't exist (even when windows are open). There is no reliable API to tell us when new ones are made or when old ones go away. Presumably, post_window_command (http://www.sublimetext.com/docs/3/api_reference.html#sublime_plugin.EventListener http://www.sublimetext.com/docs/3/api_reference.html#sublime...) would fire off with a close command, but this function has never worked. https://github.com/Floobits/floobits-sublime/blob/master/floobits.py#L396 https://github.com/Floobits/floobits-sublime/blob/master/flo... Here is another quick hack polling the editor to know when its safe to call the sublime API: https://github.com/Floobits/floobits-sublime/blob/master/floobits.py#L922 https://github.com/Floobits/floobits-sublime/blob/master/flo... Here is a yet anther example needed for functionality and using callbacks to keep sublime from crashing: https://github.com/Floobits/floobits-sublime/blob/master/floo/sublime_connection.py#L194 https://github.com/Floobits/floobits-sublime/blob/master/flo... Here is another example of pure craziness forced on us by ST3. We need to patch Views, but ignore our own patches (locally) so we don't form an echo loop. We also need to move the cursor so it doesn't jump. Sublime deals with these changes so poorly, we are forced to jump through hoops. In contrast- emacs/vim/intellij are basically fine just dumping on the entire buffer. https://github.com/Floobits/floobits-sublime/blob/master/floobits.py#L804 https://github.com/Floobits/floobits-sublime/blob/master/flo...
- wbond 13y agoI don't know if I'd call it extremely limiting… there are some places I'd like to see more accessibility. However, I've built some pretty extensive stuff with it. I would love to see ssl compiled in - I believe the reason Jon currently doesn't is that it would require building on at least 6 different machines to cover 0.9.8 and 1.0.0 (libssl.so.10 and libssl.so.1.0.0) for x86/x64 plus a customized version of ssl.py.
- ricardobeat 13y agowhere on earth would a professional software developer find SIX different machines to run builds on??
- doorhammer 13y agoI've been using ST2 a lot recently and while I really like it, feature wise, I've had horrible issues with documentation. The big issue is that it doesn't seem to meaningfully exist, especially if you're looking to quickly start modifying things and creating new functionality. Maybe I missed the boat on it somewhere, but it's a nightmare to find anything out about it that isn't pretty simple. I've ended up doing a lot of digging through the keybindings, experimenting with random keywords, and reading other peoples code to get things to work. While that in and of itself is a learning experience (and there's something to be said about reading other code), it's hard to rftm when there's not really an m. I guess it may be that my google-fu is just sucking lately, but the docs situation seems bad after a few weeks of using it. If I'm wrong and anyone has any suggestions, let me know and I'd really like to check them out.
- AlwaysBCoding 13y agoThis is dead accurate. I'm a huge fan of Sublime, but their API/documentation is an atrocity. As much as I love my current Sublime setup, if there were an editor with a well documented API for writing custom plugins I would switch in an instant.
- kansface 13y agoCheck out http://atom.io/docs/api/v0.60.0/api/ http://atom.io/docs/api/v0.60.0/api/. I've played around a bit in the beta. Debugging with the webkit inspector is nice.
- lobster_johnson 13y agoIndeed. I tried to implement a fast project switcher plugin at one point; ie., a plugin to quickly switch to another window by autocompleting its project name, like super+P (instead of having to cycle windows or use the window menu, both of which are poor UIs when you have anything more than two windows open). But the API doesn't support focusing windows. You can switch focus to a different buffer in an arbitrary window, but it won't make the window itself active. I reported the limitation in the forums. Never got a response. Didn't surprise me; I have reported a bunch of other problems, hardly any of which received Jon Skinner's attention.