Menu

#1198 Tab key behavior not consistent with other editors

open
Editor (491)
5
2010-07-30
2010-07-30
Anonymous
No

This bug is *not* related to the usual issues people have with insertions of tabs vs. spaces.

The issue is that the Tab key behavior is not consistent with other Eclipse editors.

After code is inserted on your behalf, it's customary for the Tab key to cause the cursor to skip over the automatically inserted text so you can continue editing.

For instance, if I type a single quote, then the end quote is added and the cursor is put in between the two. The "normal" use case for this is to fill in the string and then hit Tab to skip over the end quote (or whatever was auto-inserted). In PyDev, under these circumstances when the cursor is adjacent to auto-inserted end-text, the Tab key simply inserts spaces/tabs as usual.

Since this feature does not work the same as in other editors, I'm wondering how the PyDev authors intend it to be used?

When I type 'hello'
^----- cursor is now just before the auto-inserted end-quote

am I supposed to use the arrow-keys and/or mouse to skip over the auto-inserted quote? That kind of defeats the purpose -- it would be easier simply to type the quote.

Mostly this is just disconcerting because after many years of using the C++ IDE in Eclipse, I'm used to hitting Tab in these circumstances... I can retrain my brain easily enough, but thought that maybe PyDev should be consistent with the other IDEs?

Let me know what you think and/or if there's an alternate way to use this as you intended.

Discussion

  • Anonymous

    Anonymous - 2010-07-30

    p.s. -- my demonstration "When I type 'hello'" was broken by the submission process (and probably non-monospace fonts). The arrow is supposed to be pointing just before the end quote in 'hello'

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-08-20

    Actually, as python is very much line oriented (as you don't need the ';' at the end of each statement), usually after typing your stuff you'd go to the next line with shift+enter...

    Although I agree that in some circumstances it may be nice to have that linking (although sometimes I feel that it gets in the way).

     
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.