views:

724

answers:

1

I am wondering how to do (or where to find documentation) on these basic macro and snippet operations in Komodo Edit.

  • 1) FILE/IO: write a string to a temporary file from within a komodo javascript macro

  • 2) FILE/IO: read the content of a text file into a string within a komodo javascript macro

  • 3) INCLUDES: cross-reference local javascript "include" libraries within a macro, or something equivalent to #script src="~/mylocal_javascript_addons.js" So I can consolidate macro code.

  • 4) SNIPPET_OUTPUT: create a snippet interpolation placeholder that returns the output of a user-defined javascript function or macro.

    For example:

    [[%(myscript:SayHelloWorld())]]

    [[%(foomacro-MyAgeInMilliseconds)]]

  • 5) MACRO_OUTPUT: macro that takes a multiple-line selection in the current buffer and passes it to a local script or batch file, and then replaces the selection with the output result. (Need a way to do this in MSFT Windows, not just linux).

If you can answer one or more of these using Python instead of Javascript, that's great, but please include sample code or a link to it, because the Python documentation seems to be extremely TODO.

+2  A: 

Don't have your answers, but you might have more luck asking here:

http://community.activestate.com/forums/komodo-extensions

troyt