Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

[Qt console] cannot insert new lines into console functions using tab #513

Closed
satra opened this Issue · 4 comments

4 participants

Satrajit Ghosh Thomas Kluyver Min RK Fernando Perez
Satrajit Ghosh

OS X: 10.6

if you define a function on the console and come back to edit it, the indentation is off by one character when using tab. you can edit any existing line, but you cannot indent a new inserted line with a tab - seems to default to 3 spaces. if you physically type 4 spaces, its fine.

Thomas Kluyver
Owner

On my system (Linux), the tab key seems to insert a tab character, rather than some spaces, when the cursor is at the beginning of a line.

Min RK
Owner

I do not believe that tab gets converted into spaces in the console (it definitely doesn't on my OSX system). It is true that the result does not always align with 4-space indentation, but that's because the whole console is a rich text field, so the tab marks will actually vary relative to the line start depending on the length of the input prompt.

We should probably bind to insert 4 spaces, to prevent confusion.

Min RK
Owner

Since the problem here is that tab inserts a tab character this isn't a bug, so I'm marking as an enhancement. We should definitely add support for soft-tabs, though.

Fernando Perez
Owner

See #900 for the tab-as-4-spaces issue.

Min RK minrk closed this issue from a commit
Min RK minrk add 4-space soft-tabs to qtconsole
pressing tab inserts four spaces, so there should never be any '\t' characters
inserted by typing.

closes gh-900
closes gh-513
33cfae8
Min RK minrk closed this in 33cfae8
Brian E. Granger ellisonbg referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
matthew von rocketstein mattvonrocketstein referenced this issue from a commit in mattvonrocketstein/ipython
Min RK minrk add 4-space soft-tabs to qtconsole
pressing tab inserts four spaces, so there should never be any '\t' characters
inserted by typing.

closes gh-900
closes gh-513
cc6d90c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.