ActiveState Community

how to get all files saved before running any command?

Posted by leojay1 on 2008-08-20 03:10

for instance, can i make the out of box command "Find in Files" run after saving all files, and i don't have to press CTRL+SHIFT+S?

thanks.

troyt | Wed, 2008-08-20 12:39

Just use a macro to chain these commands together. Here's one in JavaScript:

ko.commands.doCommand('cmd_saveAll');
ko.commands.doCommand('cmd_findInFiles');
ko.commands.doCommand('cmd_saveAll');
ko.commands.doCommand('cmd_findInFiles');

You can then add this macro to a custom toolbar and/or assign a key binding to it.

A list of Komodo commands can be found here:

http://docs.activestate.com/komodo/4.4/commandid.html

Macro documentation can be found here:

http://docs.activestate.com/komodo/4.4/macros.html

... and the JavaScript API here:

http://docs.activestate.com/komodo/4.4/komodo-js-api.html