-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Tab to do code completion in the Editor #696
Comments
From steve.f....@gmail.com on 2011-07-05T14:04:20Z This feature would break the editor for my use. I frequently use the tab key to indent code in these circumstances. With these rules I'm suddenly trying to code complete instead of indent as desired. There is already a built in shortcut (ctrl+space) to perform code completion. This is a common shortcut in the majority of editors I've used. This seems like a custom feature for a very small subset of users. If this is implemented there should be a global enable/disable flag to prevent breaking current functionality. |
From pierre.raybaut on 2011-07-10T06:45:11Z Thanks for your kind proposition, Roland. I'm quite reluctant to implement this feature as is. So the only way that I see to implement this is to add another option, say "Tab triggers code completion when cursor is at end of line" - still the conflict mentioned above will remain and adding another option like this is not as trivial as it may seem. Status: ContributorNeeded |
From pierre.raybaut on 2011-07-10T06:45:31Z Summary: Code completion / Tab shortcut |
From pierre.raybaut on 2012-03-18T14:10:20Z Status: HelpNeeded |
From alexchan...@gmail.com on 2013-01-09T16:50:58Z The eclipse command is Control+Space, and this would work here. But this is an important issue, and it should be added regardless of the key command. In fact, it could be added in the preference, without a default key binding. |
From ccordoba12 on 2014-01-02T07:18:17Z Summary: Use Tab to do code completion in the Editor (was: Code completion / Tab shortcut) |
From ccordoba12 on 2014-01-06T13:03:55Z This issue was updated by revision c334981bcef6 .
Status: Fixed |
From roxfox...@gmail.com on 2014-02-04T19:41:11Z This is rather useful for those coming from a shell or IPython perspective or background. Hitting the tab key for an auto completion and/or calltips behavior is almost instinctual for me after working with IPython for so long. With this keystroke configurable, this means less changes in workflow for folks on both sides of the aisle, those who come from say Eclips IDE or IPython. |
From ccordoba12 on 2014-02-07T05:14:07Z Yep, that was idea: to minimize friction and increase productivity. Even I am getting accustomed to it after using Ctrl+Space for so long. |
From steve.f....@gmail.com on 2014-02-10T11:54:38Z Yeah, I take back my prior comment on this. I like tab as auto complete when in the middle of the line always. I switched to mac osx and started using sublime text. For some reason spyder is having various issues that I haven't cared to take the time to debug... |
From loc...@gmail.com on 2011-06-24T04:18:51Z
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 completion 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 is only a first approach (ignores keyboard shortcut settings) but 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()
Result of diff -u codeeditor.py /d/Python/python-2.7/Lib/site-packages/spyderlib/widgets/sourcecode/codeeditor.py is attached to the issue.
Regards,
Roland
Attachment: code-completion-on-tab.patch
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=696
The text was updated successfully, but these errors were encountered: