Hi. Let's say I have 3 commands and they all use `callback.document.will-save` as semantic class. What is the order of execution? or How can I set the order? In my experience, the last created command runs first. I'm not quite sure about it. I've been trying to improve my Python formatter bundle. I have some tasks to do in order. Couldn't figure out exactly the execution order of it.
Thanks
--- Uğur "vigo" Özyılmazel
https://github.com/vigo https://gitbook.com/@vigo http://ugur.ozyilmazel.com | @vigobronx http://devpod.org | @podcastmaster http://gelistiriciyiz.biz | @gelistiriciyiz
On 29 Nov 2018, at 14:24, Uğur Özyılmazel (vigo) wrote:
Hi. Let's say I have 3 commands and they all use `callback.document.will-save` as semantic class. What is the order of execution? or How can I set the order?
In practice TextMate keeps all items in an ordered container indexed by their semantic class.
So you should be able to add an alphanumeric suffix to the semantic class to affect sorting, e.g.:
- `callback.document.will-save.1` - `callback.document.will-save.2` - `callback.document.will-save.3`
Can you let me know what the 3 callbacks each do? Using the semantic class system for callbacks was a quick prototype that never evolved into a proper system, but I still have an open issue about it, so it would be good to add dependency requirement examples to this issue.
Hi Allan, thanks for quick response. Well, here are my tasks:
before save the python document,
- run `isort` then (first) - run `flake8` (second)
then do the save (textmate is handling this)
after save,
- run `flake8` - run `pylint`
You can check the bundle here : https://github.com/vigo/textmate2-python-fmt
also; https://github.com/vigo/textmate2-python-fmt/blob/master/Support/python_help...
currently I have 2 different commands, one is running on "will-save" other is running on "did-save". On "will-save" I'm calling a function which handles "black" and "isort" sequentially. I'm planning to seperate functions by using "will-save". I guess I can do it right now. or mine is already ok? Would be great if you can skim out the bundle...
--- Uğur "vigo" Özyılmazel
https://github.com/vigo https://gitbook.com/@vigo http://ugur.ozyilmazel.com | @vigobronx http://devpod.org | @podcastmaster http://gelistiriciyiz.biz | @gelistiriciyiz
On 29 Nov 2018, at 12:46, Allan Odgaard mailinglist@textmate.org wrote:
On 29 Nov 2018, at 14:24, Uğur Özyılmazel (vigo) wrote:
Hi. Let's say I have 3 commands and they all use `callback.document.will-save` as semantic class. What is the order of execution? or How can I set the order?
In practice TextMate keeps all items in an ordered container indexed by their semantic class.
So you should be able to add an alphanumeric suffix to the semantic class to affect sorting, e.g.:
callback.document.will-save.1 callback.document.will-save.2 callback.document.will-save.3 Can you let me know what the 3 callbacks each do? Using the semantic class system for callbacks was a quick prototype that never evolved into a proper system, but I still have an open issue about it, so it would be good to add dependency requirement examples to this issue.
textmate mailing list textmate@lists.macromates.com https://lists.macromates.com/listinfo/textmate