-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Automatically indent "end" for ruby code #2272
Comments
I'm guessing this will come in the next release? |
Any update on this? |
+1 for this feature |
@rebornix does your ruby extension do this? |
Firstly we have snippets in my ruby extension so each time you type Secondly, I think we have this auto indenting feature but unluckily I found it not working right now. I'll let you guys know when I have more info, then this issue can be treated as external. |
I'm trying to support correct indentation as Atom does, and find following interesting difference between VS Code, Atom and TextMate. TextMate documents But when we come to However, in our implementation as below
Per comments we put in the definition, we are unindenting lines after but not the current line. I'm not sure if it's the root cause, but this makes There is also a long bebate to add |
@rebornix I followed https://manual.macromates.com/en/appendix while implementing it. I think I got wrong the semantics of The implementation is at https://github.com/Microsoft/vscode/blob/master/src/vs/editor/common/modes/supports/onEnter.ts#L128 To support decreasing the current line indent, the |
Are there any updates on this? It's the one crutch for developing ruby apps using VS Code |
Lua as well. :( |
For the julia extension we are also waiting for this, would be great if this could be prioritized. |
bump. |
+1 this is really annoying. |
+1 for visibility since this isn't getting any love. |
+1 its time to give some love to this bug |
My investigation up there #2272 (comment) is kind of misleading. The existing code and logic is correct and necessary. The only thing we didn't take into consideration is modifying indentation while users type. Right now, our existing logic about Another part is actually modifying indentation while users type. Since we are at the end of this iteration and adding this feature to master might affect TypeScript, Ruby and any other potential extension that leverages Stay tuned. |
Any updates on this? I'd like to use Visual Studio Code for Ruby projects but this behavior is frustrating coming from other editors. |
Yeah, I just tried to start using VSCode for Ruby development, and I have to say, this is kind of a deal breaker. This makes just writing basic Ruby code pretty frustrating. I'm sure it will get fixed at some point. I'll revisit then. |
+1 |
1 similar comment
+1 |
This seems to work for me now after inserting a newline after the end, but it would be good if this happens right after Ideal behavior: In the gif in the issue description: #2272 (comment) This is still better than what it was before. |
Yes, let me second that request that things should unindent not just on enter, but when then word I also think it would be great if this could move to a milestone fairly soon. It is one of the few core areas where VS Code currently lacks behind something like Atom. |
I started using VSCode 2 days ago, moving from Sublime, and I love it. This, however, is one of the few things that annoys me at the moment... |
Agreed. I love VS Code thus far, but I'm switching back to Atom for Ruby development just because of this. |
VSCode is by far my favorite editor, except for this. Would absolutely love to see this implemented. |
VSCode is awesome, I've gotten around this by Shift+TABing following |
Not just indentation, but also highlighting do/end brackets for languages like It works fine with braces |
To add my voice, as a newcomer I'm extremely happy with VS Code but this just seems odd. If this works for curly-brace languages, I can't see the logic in not implementing this same behavior for languages which terminate blocks with |
You can now set |
This issue was reintroduced in the latest update |
Search for editor.autoIndent in settings and change it to true |
In VSCode 0.10.6 the "end" in ruby doesn't gets indented after writing it. It should be handled like the brackets in Javascript.
Left: VSCode, Right: Atom (Gif. Reload to see it again)
The text was updated successfully, but these errors were encountered: