We have done COLT integration with Sublime. The changes are so significant that we even added a unit after the point and now COLT has version 1.2.5.
What is the release chip? We call it Real Time Programming .
The idea is that having an application running all the time, you have the opportunity all the time to know how your code works. We supply each function in your code with special observers who can execute any code as a function, and store all the values of variables from the last run. ')
What is the result? Autocomlit now sees real fields and functions of objects. Press ctlr + space and -
Or even so! -
Or so.
The [COLT] suffix in auto-complete indicates that information about this field / function is obtained from the application's memory. Also note that COLT displays information about the actual arguments of the function.
Now we can run any function - place the cursor in the function body or on its name and press shift + F5.
And (this is important), calling the function again, you call it with the same arguments that it was called the last time! For example, you changed its logic, called the function - looked at the logs, looked at the browser, moved on, started this function again.
Go to Declaration - F3 . Now you will always find your function, wherever it is referred to and called. COLT, to achieve the effect of “live delivery” of code changes, knows where each “live” function is located, in which file. Each is numbered - the function has its own unique ID. Therefore, when you call a function or your variable refers to a function, now you will definitely go into its declaration. Even if the JS-document is not open!
With new autocomplete and Goto Declaration functionality, it became more convenient to develop jquery plugins and work / maintain code with complex inheritance and "functionalism".
Finally, you can find out at any time the value of any field or variable. Just setting the cursor on the field and pressing Shift + F10.
Since all these new features are available only when the web application is running at the time of development, in the Live mode, we made launching the application, creating the COLT project as easy as possible. To run a page from Sublime to COLT you only need to go to the tab with the HTML you want to run and call the command “Run with COLT” - cmd + shift + F10. No need to run COLT, open, create and configure a project.
To restart a COLT session, you need to press this combination again.
To make a simple reload page just click cmd + shift + R.
To track the connection status, and you can just minimize the COLT or browser window, and you need to know if everything is fine there, we added a simple way to indicate the status.
Down in the Sublime window there is information about the connection status.
Disconnected from COLT - COLT either was not open, or Sublime was closed and the status was lost. Press shift + cmd + F10 to launch COLT and the application in live mode.
Connected to COLT - Sublime "sees" COLT, but the session is not running. May be due to the emergency termination of the application. We are trying in every way to support the life of the application, to run only the correct code, to intercept errors, but anything can happen.
[~] Connected to COLT - this is already the operating mode. The application is running in Live mode and the world of Real Time Programming is available to you. The small tilde in square brackets is the textual representation of the green lightning indicator in COLT.
And install the Sublime package "COLT" via Package Control. You can easily migrate the functionality of our Sublime extension to other editors. Sources are three Python files. Everything is relatively clear there.