Skip to content Skip to sidebar Skip to footer

Calltips/docstring While Viewing Function List?

I just recently switched to Komodo for Python programming, and I'm loving it so far. I love how if I type a function name, followed by the open-paren (, it opens the calltip/docst

Solution 1:

Use a macro which inserts the selected function, adds the parentheses, and triggers the calltip automatically. Both popups cannot be shown simultaneously, so assign the macro to a keyboard shortcut, and alternate between that shortcut and the undo shortcut to add/remove parentheses and show/hide the function list:

komodo.assertMacroVersion(2);
if (komodo.view && komodo.view.scintilla) { komodo.view.scintilla.focus(); }

var editor = ko.views.manager.currentView.scimoz;
var cursor_character = editor.getCharAt(editor.currentPos - 1); //get cursor position
editor.autoCComplete(); //autocomplete selected function in list
editor.copyText(1,"("); //add left parentheses to bufferif(cursor_character > 96 && cursor_character < 123)
  {
  editor.paste(); //add left parentheses to editor after a function name 
  }
ko.commands.doCommand("cmd_triggerPrecedingCompletion"); //trigger calltip or function list

References

Post a Comment for "Calltips/docstring While Viewing Function List?"