[TxMt] Re: callback.document.will-save order

"Uğur Özyılmazel (vigo)" ugurozyilmazel at gmail.com
Thu Nov 29 11:08:51 UTC 2018


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_helper.rb

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 at 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 at lists.macromates.com
> https://lists.macromates.com/listinfo/textmate

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20181129/195872b3/attachment-0001.html>


More information about the textmate mailing list