ActiveState Community

Opening Komodo Edit straight to a TXT document

Posted by xichael on 2009-10-28 21:34

Is there some way to have Komodo Edit open a text file upon launching?

toddw | Thu, 2009-10-29 11:06

You should be able to right-click on a file and use the "Edit with Komodo" menu option and Komodo will startup and open the file. If you do not have these Komodo right-click menu options then start Komodo and go into the preferences and tweak the "Windows Integration" category.

Cheers,
Todd

...
xichael | Thu, 2009-10-29 14:36

I just want to be able to have a txt document automatically open in Komodo upon clicking the icon from my quicklaunch bar. It'd be one less click.

Is there some kind of switch I can add to the shortcut?

toddw | Fri, 2009-10-30 10:40

Yes - I believe you need to make Komodo the default handler for the "Open with" Windows command, see:
http://support.microsoft.com/kb/307859

Note: For most dynamic languages (Python, Perl, PHP) this will be set to the interpreter - i.e. you want to run the script, not edit it.

Cheers,
Todd

txt
xichael | Fri, 2009-10-30 11:59

Setting Komodo as the default program for text files doesn't make it open a text file automatically upon launching. I just want Komodo to have a blank text document open for me when I start it up, rather than having to click the "New File Using Default Language" icon. Is this possible?

toddw | Fri, 2009-10-30 12:40

Sure, use a Komodo macro (add this as a JavaScript Macro to your Komodo toolbox):

ko.views.manager.doNewViewAsync();
ko.views.manager.doNewViewAsync();

Then in the macro properties - select the "Triggers" tab, enable the "Macro should trigger on a Komodo event" and then select the "On startup" option. The next time you start Komodo it will create a new empty view for you.

Cheers,
Todd

xichael | Fri, 2009-10-30 13:17

Thanks Todd, exactly what I was looking for.