Calltips/Docstring while viewing function list?

放肆的年华 提交于 2019-12-01 08:01:16

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 buffer

if(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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!