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

PR: Add indentation shortcuts and simple indentation for non-Python files #4567

Conversation

rlaverde
Copy link
Member

@rlaverde rlaverde commented Jun 6, 2017

Fixes: #3406
Fixes: #4157

I added configurable shortcuts for indent/unindent, with Ctrl+[/Ctrl+] as defaults, I didn't change Tab/Shift+Tab logic because Tab can't be a shortcut (so I leave it hardcoded), also it could interfere with autocompletion

I didn't add new preferences for simple indentation, It's activated in non-Python files. as discussed in #4157

@rlaverde rlaverde added this to the v3.2 milestone Jun 6, 2017
@rlaverde rlaverde self-assigned this Jun 6, 2017
@rlaverde rlaverde requested a review from ccordoba12 June 6, 2017 16:08
@ccordoba12
Copy link
Member

@rlaverde, other tests are failing. Please review that.

@rlaverde rlaverde force-pushed the indentation-shortcuts-and-simple-indentation branch from 0bd0904 to 8c4a876 Compare June 6, 2017 16:34
@rlaverde
Copy link
Member Author

rlaverde commented Jun 6, 2017

other tests are failing. Please review that.

Fixed, It was missing to forward pass kwargs to fix_indent function.

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @rlaverde!

@ccordoba12 ccordoba12 changed the title PR: Indentation shortcuts and simple indentation PR: Add indentation shortcuts and simple indentation for non-Python files Jun 7, 2017
@ccordoba12 ccordoba12 merged commit 517aaa4 into spyder-ide:3.x Jun 7, 2017
ccordoba12 added a commit that referenced this pull request Jun 7, 2017
@@ -367,6 +367,8 @@
'editor/delete line': 'Ctrl+D',
'editor/transform to uppercase': 'Ctrl+Shift+U',
'editor/transform to lowercase': 'Ctrl+U',
'editor/indent': 'Ctrl+[',
'editor/unindent': 'Ctrl+]',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rlaverde, these shortcuts are used in the reversed, i.e.

  • Ctrl + ] -> Indent
  • Ctrl + [ -> Unindent

At least that's the case in Sublime: https://gist.github.com/eteanga/1736542

So please open a new PR to fix that.

@rlaverde rlaverde deleted the indentation-shortcuts-and-simple-indentation branch June 9, 2017 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants