Menu

#1080 pydev suggests "import return" instead of "import re"

open-accepted
5
2010-03-09
2010-02-26
YoHell
No

When I want to use regular expressions I type "import re" and press return to continue writing code. However, code completion always interferes at this point and my "enter" keypress is instead interpreted as my choosing the top code completion suggestion at this point, which is "return".

Code completion should not suggest to import keywords, as this is imposible.
Code completion should not give higher priority or default to longer names when what is already typed is perfectly legal. In these cases, the already typed, legal, shorter name should remain the top suggestion.

Discussion

  • Fabio Zadrozny

    Fabio Zadrozny - 2010-02-26
    • status: open --> closed-works-for-me
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-02-26

    Actually, the proper way would be using Shift+Enter to go to the next line.

    Shift+Enter is better in many ways when you want to go to the next line, as it will cancel the completion and go to the next line and you can use it in any place in the line.

    Still, you can configure the completions to show in window > preferences > pydev > editor > code completion (ctx insensitive and common tokens), but I higtly suggest you leave it as is and retrain your brain to shift+enter for a new line (that way return is always re+enter, print is p+enter, raise is ra+enter, etc)

    I'll probably add this as something important in the manual, as it really makes a difference.

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-02-26
    • status: closed-works-for-me --> pending-works-for-me
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-03-09
    • status: pending-works-for-me --> open-accepted
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.