Hi Roland,
You have a very valid point here. I often find myself a bit confused
because I use tab all the time on the console to get code completions
and it would be great to have it on the editor too.
Please open an issue in our issue tracker, here:
http://code.google.com/p/spyderlib/issues/list
post your patch there and we'll see what we can do about it.
Cheers,
Carlos
El 23/06/11 06:24, roland escribió:
Dear Developers,
It would be nice to be able to use the tab key for calling code
completion in the code editor.
Pressing tab to call code completion and tab also to choose from list
reduces keyboard work.
Now (2.0.12) it is impossible to set up this configuration via
keyboard shortcuts.
One could ask, what if the programmer presses tab in order to indent
and not to complete code?
Answer: when tab is pressed and only white spaces are previous to the
cursor, an indentation should be made instead of code completion. If
any not white space character stands previous to the cursor, code
completion should be called.
The following code does the trick:
$ diff codeeditor.py /d/Python/python-2.7/Lib/site-packages/spyderlib/
widgets/sourcecode/codeeditor.py
1662c1662,1667
< self.indent_or_replace()
---
# self.indent_or_replace()
line = unicode(self.textCursor().block().text())
if not line[:self.textCursor().positionInBlock()].strip():
self.indent_or_replace()
else:
self.emit(SIGNAL('trigger_code_completion(bool)'), True)
Regards,
Roland
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/spyderlib?hl=en.