Hi all,
I have found that I had to finally learn to create Commands in a TM Bundle to move beyond what snippets alone can do (even though they have such a brilliantly simple syntax...) Is there any canonical listing of values to use Semantic Class hooks?
Also I couldn't find it in the docs, but realized by reading other examples, the way to get the whole document text reliably is to read stdin in a script, then write to stdout.
It might be really great stuff to get documented for everyone.
Finally, what is the recommended flow for managing & sharing bundles? Certainly, putting changes into Github would be ideal where possible. But here are two use cases I have. In my workplace we have stuff we cannot share outside, but we would like to share and maintain a group repo internally to grow up some TM Bundles.
I also sometimes need to work on multiple systems.
I'd like to understand the best way to sync or centralize and update bundles. What are the best practices with this?
On 17 jan 2017, at 05:33, じょいすじょん dangerwillrobinsondanger@gmail.com wrote:
I have found that I had to finally learn to create Commands in a TM Bundle to move beyond what snippets alone can do (even though they have such a brilliantly simple syntax...) Is there any canonical listing of values to use Semantic Class hooks?
This is a list of semantic class callbacks that I’ve managed to collect from different places:
* callback.application.did-activate * callback.application.did-deactivate * callback.document.binary-export * callback.document.binary-import * callback.document.did-reload * callback.document.did-save * callback.document.export * callback.document.import * callback.document.will-reload * callback.document.will-save * callback.double-click * callback.file-browser.action-menu * callback.mouse-click (old) * callback.single-click * callback.triple-click
For mouse click callbacks, the following modifiers can be used:
* dyn.modifier.shift * dyn.modifier.control * dyn.modifier.option * dyn.modifier.command
The modifiers are set in “Scope Selector”.
Hey Jacob,
Thanks for collecting these. What does the community think, should these be placed on the github wiki on a page so that it’s searchable and easier to discover? https://github.com/textmate/textmate/wiki https://github.com/textmate/textmate/wiki
What do you think?
— Attila
ATTILA GYÖRFFY I develop software.
attilagyorffy.com http://attilagyorffy.com/ | @attilagyorffy http://www.twitter.com/attilagyorffy | | in/attilagyorffy http://linkedin.com/in/attilagyorffy | github.com/attilagyorffy http://www.github.com/attilagyorffy
Every time you print an email, a tree is marked for death. Trees provide O2. You need that to breathe, remember? 🌳
On 17 Jan 2017, at 18:46, Jacob Carlborg doob@me.com wrote:
On 17 jan 2017, at 05:33, じょいすじょん dangerwillrobinsondanger@gmail.com wrote:
I have found that I had to finally learn to create Commands in a TM Bundle to move beyond what snippets alone can do (even though they have such a brilliantly simple syntax...) Is there any canonical listing of values to use Semantic Class hooks?
This is a list of semantic class callbacks that I’ve managed to collect from different places:
- callback.application.did-activate
- callback.application.did-deactivate
- callback.document.binary-export
- callback.document.binary-import
- callback.document.did-reload
- callback.document.did-save
- callback.document.export
- callback.document.import
- callback.document.will-reload
- callback.document.will-save
- callback.double-click
- callback.file-browser.action-menu
- callback.mouse-click (old)
- callback.single-click
- callback.triple-click
For mouse click callbacks, the following modifiers can be used:
- dyn.modifier.shift
- dyn.modifier.control
- dyn.modifier.option
- dyn.modifier.command
The modifiers are set in “Scope Selector”.
-- /Jacob Carlborg
textmate mailing list textmate@lists.macromates.com http://lists.macromates.com/listinfo/textmate
Yeah, why not. Or in the manual [1], perhaps under References.
[1] http://manual.textmate.org/
If you do get around to this; don’t forget onDocumentChange and onDocumentSave from
http://textmate.1073791.n5.nabble.com/Fw-quot-Document-did-change-quot-and-a...
and (possibly) more;
http://lists.macromates.com/textmate/2016-October/039983.html
Thanks,
Graham Heath
On January 17, 2017 at 10:57:03 AM, Jacob Carlborg (doob@me.com) wrote:
Yeah, why not. Or in the manual [1], perhaps under References.
[1] http://manual.textmate.org/
Thanks to all, especially Jacob, for sharing these.
(without checking source code) It looks like these correspond to Objective-C delegate style callbacks.
I think these and some description of their semantics would be fabulous on the wiki or in the manual. Bonus points for reference to default bundles' items that use these so people can see an example of any in use.
The Commands really really do take everything to a higher level and start making things magical!
It might also be really fabulous to know if any of them have any API contract of sorts. Like: "don't do this horrible thing when using this semantic-selector" "a script should finish quickly or it will block the UI"
This kind of documentation will most definitely bring people back.
I keep trying Sublime, and it doesn't fit my brain, and the colors are off somehow (very irritating to me). I keep trying Atom every few months, as it advances, but as much as they do cool things, it's still really running in Node under Electron, and everything is in a web page where the UI and keyboard shortcuts end up written by Windows programmers.
They've borrowed a lot from tm bundles, but missed out some of the great stuff too. Github even bases MOST of its syntax grammars off of the default tmbundles' grammars.
From that experience, I can say I am sure the other component is having a killer way to manage bundles. Right now it's not terrible, but it can be better. I do feel bundle management needs to have the following things made simple and easy. Export Share Sync Working Sets Security Bundles need to be able to be limited somehow based on various criteria, like network location and password/keychain or something. Bundles need some sort of signing to avoid somebody slipping in some nefarious things. Market? If TM could ever go to MAS, they could be IAP, but it might be great to have a bundle market. True plugins or xpc connections? Lastly, I would still love to see a full blown editor for themes. I miss the old simple one, but would love to see a big one. (and none of the competitors do transparency like TM can :) )
What are the thoughts out there?
On 2017 Jan 18, at 4:59, Graham Heath graham.p.heath@gmail.com wrote:
If you do get around to this; don’t forget onDocumentChange and onDocumentSave from
http://textmate.1073791.n5.nabble.com/Fw-quot-Document-did-change-quot-and-a... http://textmate.1073791.n5.nabble.com/Fw-quot-Document-did-change-quot-and-access-to-the-current-document-in-a-bundle-td30517.html
and (possibly) more;
http://lists.macromates.com/textmate/2016-October/039983.html http://lists.macromates.com/textmate/2016-October/039983.html
Thanks,
Graham Heath
On January 17, 2017 at 10:57:03 AM, Jacob Carlborg (doob@me.com mailto:doob@me.com) wrote:
Yeah, why not. Or in the manual [1], perhaps under References.
[1] http://manual.textmate.org/ http://manual.textmate.org/
-- /Jacob Carlborg
On 17 jan 2017, at 18:58, Attila Györffy <attila.gyorffy@gmail.com mailto:attila.gyorffy@gmail.com> wrote:
Hey Jacob,
Thanks for collecting these. What does the community think, should these be placed on the github wiki on a page so that it’s searchable and easier to discover? https://github.com/textmate/textmate/wiki https://github.com/textmate/textmate/wiki
What do you think?
— Attila
ATTILA GYÖRFFY I develop software.
attilagyorffy.com http://attilagyorffy.com/ | @attilagyorffy http://www.twitter.com/attilagyorffy | | in/attilagyorffy http://linkedin.com/in/attilagyorffy | github.com/attilagyorffy http://www.github.com/attilagyorffy
Every time you print an email, a tree is marked for death. Trees provide O2. You need that to breathe, remember? 🌳
On 17 Jan 2017, at 18:46, Jacob Carlborg <doob@me.com mailto:doob@me.com> wrote:
On 17 jan 2017, at 05:33, じょいすじょん <dangerwillrobinsondanger@gmail.com mailto:dangerwillrobinsondanger@gmail.com> wrote:
I have found that I had to finally learn to create Commands in a TM Bundle to move beyond what snippets alone can do (even though they have such a brilliantly simple syntax...) Is there any canonical listing of values to use Semantic Class hooks?
This is a list of semantic class callbacks that I’ve managed to collect from different places:
- callback.application.did-activate
- callback.application.did-deactivate
- callback.document.binary-export
- callback.document.binary-import
- callback.document.did-reload
- callback.document.did-save
- callback.document.export
- callback.document.import
- callback.document.will-reload
- callback.document.will-save
- callback.double-click
- callback.file-browser.action-menu
- callback.mouse-click (old)
- callback.single-click
- callback.triple-click
For mouse click callbacks, the following modifiers can be used:
- dyn.modifier.shift
- dyn.modifier.control
- dyn.modifier.option
- dyn.modifier.command
The modifiers are set in “Scope Selector”.
-- /Jacob Carlborg