I'm having a problem getting my local variables autocompleted. This is a very basic functionality which I'm sure it should support. When I'm starting to write a variable name which was already declared, and press TAB (this is the default shortcut), I get nothing. Is this a bug?
To do so, open Spyder's preferences, click on "Completion and linting" on the left hand side, and under the "Completion" tab, make the following changes: Ensure that "Enable code completion" is checked.
(Spyder maintainer here) Unfortunately, Spyder can't provide code completion for all Python objects. This is not a failure in Spyder but a limitation in Python, due to its dynamic nature. Sorry.
Use Tools >> Preferences >> Editor >> Advanced Settings >> Untick "Automatic insertion of parentheses, braces and brackets" Then Apply >> OK .
To enable Kite in Spyder, go to Preferences/ Settings -> click on Completion and Linting -> click on the “Advanced” tab -> click “Enable Kite” under Providers -> click “Apply”.
(Spyder dev here) Spyder does complete local variables but to have this functionality you need to install a library called rope
. You can do it by running this command in a terminal
pip install rope
If you use Python 3 this command needs to be
pip install rope_py3k
Besides, code completion on the Editor works now with both Ctrl+Space
and with Tab
.
Edit: Updated answer for the Spyder version 2.3.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With