Skip to content
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

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

Closed
satra opened this issue Jun 10, 2011 · 4 comments
Closed

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

satra opened this issue Jun 10, 2011 · 4 comments
Milestone

Comments

@satra
Copy link
Contributor

satra commented Jun 10, 2011

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.

@takluyver
Copy link
Member

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.

@minrk
Copy link
Member

minrk commented Jun 10, 2011

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.

@minrk
Copy link
Member

minrk commented Jun 24, 2011

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.

@fperez
Copy link
Member

fperez commented Oct 19, 2011

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

@minrk minrk closed this as completed in 33cfae8 Oct 20, 2011
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
pressing tab inserts four spaces, so there should never be any '\t' characters
inserted by typing.

closes ipythongh-900
closes ipythongh-513
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants