Re: [Komodo-discuss] command output to a new editor tab?
by Shane Caraveo other posts by this author
Jun 28 2008 12:59PM messages near this date
view in the new Beta List Site
Re: [Komodo-discuss] command output to a new editor tab?
|
Re: [Komodo-discuss] command output to a new editor tab?
Ã?ric Cholet wrote:
> Le 28 juin 08 à 09:37, Todd Whiteman a écrit :
>
> > Ã?ric Cholet wrote:
> >> I'm getting my feet wet at using the toolbox. Is there a way to send
> >> command output to a new editor tab? I often work with unformatted XML
> >> files. Writing a command to run "xmllint --format %F" was easy, but
> >> I'd like the result to display in a new editor tab, is this possible?
> >>
> > Hi Ã?ric,
> >
> > There is a Komodo macro on the community site that can perform this
> > type
> > of functionality, see here:
> > http://community.activestate.com/forum-topic/send-command-output-edit-window
>
> Very cool, thanks a lot. Now I have my formatted XML file show up in a
> new editor tab. I wonder if it's possible to set that tab's type to
> "XML" instead of "text", so that it would be properly syntax
> highlighted. Also marking the tab as non dirty so that I'm not
> prompted to save it when I close it would be nice. I've searched the
> online help but didn't find anything -- in fact I couldn't find
> information on most of the other stuff used in that macro, is Komodo's
> help known to be incomplete?
If the buffer is the currentView, you can do:
ko.views.manager.do_ViewAs('XML');
or directly on the view itself;
view.document.language = "XML";
you can mark the dirty state with:
view.document.isDirty = false;
koIDocument.idl is a good idl to review for some of the document level
stuff.
Regards,
Shane
_______________________________________________
Komodo-discuss mailing list
Komodo-discuss@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/Komodo-discuss
Thread:
cholet
Todd Whiteman
cholet
Shane Caraveo
Shane Caraveo
cholet
|