3

私は最近PythonプログラミングのためにKomodoに切り替えました、そして私は今のところそれを愛しています。関数名を入力してからopen-paren(を入力すると、calltip/docstringが開く方法が気に入っています。.また、モジュール名を入力し、その後にを入力すると、使用可能な関数のリストが開く方法も気に入っています。私の質問は、関数リストをアップしたときにcalltip / docstringをポップアップさせることは可能ですか?つまり、関数を挿入して引数リストを開く前に、各関数(docstring)が何をするのかを確認できるようにしたいのです。(。その理由は、関数が必要であることに気づき、関数リストをスクロールして、関連する関数を挿入してdocstringを表示し、それが正確に必要かどうかを確認してから、そうでない場合は削除して再試行するためです(機能リストを元に戻すことによって)。この機能はEclipseにあり、私はそれを模倣しようとしています。

それが複雑な場合は申し訳ありませんが、助けてくれてありがとう。

4

1 に答える 1

0

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

于 2012-02-03T18:43:37.247 に答える