Note that there are some explanatory texts on larger screens.

plurals
  1. POSublime Text 2 API ability to run nodejs script on editor start
    primarykey
    data
    text
    <p>I'm developing <a href="https://github.com/matmuchrapna/STsync" rel="nofollow" title="STsync"><strong>plugin</strong></a> which will synchronize Sublime Text configuration.</p> <p>The plugin core is node.js utility, which is doing all the stuff.</p> <p>The next step I see is to create python wrapper for plugin which will interact with <a href="http://www.sublimetext.com/docs/2/api_reference.html" rel="nofollow" title="Sublime API Reference"><strong>Sublime Text API</strong></a> and will <strong>run nodejs scipt every time text editor is opening</strong>.<br> And the main problem is that I don't know python.</p> <p>I have researched that I need to execute this custom python code:</p> <pre><code>from subprocess import call call(["node", "app.js", "../User/"], Shell=true) </code></pre> <p>Then I researched API and I thought that I need <a href="http://www.sublimetext.com/docs/2/api_reference.html#sublime_plugin.EventListener" rel="nofollow" title="Class sublime_plugin.EventListener"><strong><code>EventListener</code> class</strong></a>, but there are no events like <code>onEditorStart</code>. Then I found two <code>run_command(string, &lt;args&gt;)</code>, but I have any thoughts how to use it in my purposes.</p> <p>Then I have explored <code>Packages/Default/</code> with samples of code, which are using a lot of API functions, but still I have no idea how find usefull lines in that 101 files.</p> <p>I am almost in despair, and decided to ask here. What should I code in python to force my plugin <strong>run nodejs scipt every time text editor is opening?</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload