How do I add a version control file history button to the top menu bar in Komodo IDE X?

I would like to add a shortcut to the top toolbar to go directly to the Version Control toolbar tab and view the file’s history. I can go there by right-clicking on my file tab, selecting version control and history, but I’d like to have a direct button. Unfortunately, I cannot even figure out how to add buttons to that toolbar. All I can do when editing it is turn visibility for predefined buttons on and off. How do I add more?

Hi, I’m not sure you can add arbitrary toolbar buttons. What you can do is open the bottom pane and select the “Version Control” tab and then “File History”. At that point any file you open will populate that view and you get your file history shown.

Actually you totally can, in your toolbox create a new “Toolbar” and inside the toolbar create a new “Userscript”, then use the following code for the userscript:

ko.commands.doCommand('cmd_SCChistory')

Or if you want the history for the current file:

ko.commands.doCommand('cmd_SCChistory_File')

You can use “Record Macro” and then “Save Macro to Toolbox” (top right of toolbar) to generate these userscripts. Ie. start recording, perform the action you want to record, then stop recording and save the macro as a userscript.

Shouldn’t it be renamed to “Record Usercript” and “Save Userscript to Toolbox”?

No. But in fact it’s called “Save Macro to Toolbox as Userscript”. Quite a mouthful to type out though.

1 Like