-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Indenting multiple lines using Tab fails #2829
Comments
@alexandrudima fyi |
Same here! Cant work with it currently! It also intents completly wrong when i create a newline. (With a tab instead of spaces also...) |
That's something else and was introduced in the previous version as well. If |
This looks like Mac OS behavior for the select before the editor knows that the select requires different behavior. It's just not catching that first select. Once the file is in the working files section then the editor has it in memory...this is me speculating, though, and watching what is happening. |
Can somebody provide a link for VSCode 0.10.6? Its impossible to work on HTML with this Version. Hope to have it fixed soon. @SamVerschueren Steps to reproduce:
|
@philipgiuliani Ok, that's definitely something else. Create a new issue for that one if you don't mind as it's not the same as this one and then they can separately being tracked by the team. |
@SamVerschueren Thank you! Done in the following issue #2845. |
Previous releases are at https://github.com/Microsoft/vscode/wiki/Previous-Releases |
Having a similar issue with SQL files if I highlight some lines and try to indent them with tab. This one is strange because, in addition to killing all the text, Command + Z refuses to undo the action! If I manually indent the first line with 4 spaces and highlight the rest, hitting tab works as expected. |
@SamVerschueren @philipgiuliani @nchammas I am sorry, this looks horrible. I cannot reproduce on a vanilla (no extensions) 0.10.8 on Windows. I will try shortly on the mac |
Indeed, might be related to Mac. |
@SamVerschueren Do you have any extensions installed that might hijack the tab key? i.e. just to be sure the built-in command executes, can you please add the following to the end of your
|
Added that but still the same behaviour. Switched to the insider build and removed all the extensions I had installed over there (just to make sure) but still the same. |
I still cannot reproduce. Can you think of anything else I might be doing differently? Do you have other settings for VSCode or maybe a different keyboard layout, etc... Here I am trying on a mac: All I do is select some text, press Tab a few times and undo (Cmd+Z) I have just downloaded 0.10.8 from the website on a new mac install: @weinand @joaomoreno Can you please also try to reproduce this? |
This is odd. I installed a new fresh version of the latest insider build. Removed my I have a U.S. keyboard layout. @alexandrudima In your second example (the untitled file), can you type your text (as it is now), save it as |
No
No
No, can't reproduce with this keybinding which is odd. This is how it always acts like that.
My OS X is one patch version higher. |
I also have it on El Capitan 10.11.3 settings.json {
"files.trimTrailingWhitespace": true,
"editor.wrappingIndent": "indent",
"editor.renderWhitespace": true
} |
I also have it, this is my setting.json: {
"editor.insertSpaces": true,
"editor.tabSize": 2,
"search.exclude": {
"**/dist": true
},
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"editor.fontFamily": "hack",
"editor.fontSize": 12,
"editor.renderWhitespace": true
} on El Capitan 10.11.3 |
Quick update: just updated to El Capitan 10.11.3 and I can now immediately reproduce even with the default settings |
\O/ JEEJ! :) |
Previous releases are available from https://github.com/Microsoft/vscode/wiki/Previous-Releases |
@SamVerschueren @philipgiuliani @nchammas @sijad Can you please try the following workarounds and let us know if they work. Possible workaround 1Edit
Possible workaround 2Have a "dirty" file permanently open. (i.e. open a new untitled file, make a change in it) and then go about editing other files -- without any need to enable auto save as above. ExplanationTook a few hours to track down, the problem surfaces so far only on OS X El Capitan 10.11.3 and only on an edit that causes the first file to become "dirty": (i.e. on the edit that brings VS Code from having 0 unsaved files to 1 unsaved file). The underlying problem is we are updating the OS window to mark the VS Code window as containing a dirty file (icon gets greyed out) synchronously, in a model change listener, while the Filed issue against Electron in electron/electron#4438 and we need to revisit all our code paths where we use |
@alexandrudima - Workaround 1 works for me. 👍 |
I found another workaround (since I don't like auto-save):
Now you can tab/shift-tab to your heart's delight. As long as the file is already 'dirty', the bug won't happen. If you do happen to accidentally clobber your code with tab/shift-tab, you can right-click the file in the Working Files view and select "Revert file". This is similar to Possible Workaround 2 above, only you don't have to have an extra dirty file open all the time. |
@alexandrudima thanks! workaround 2 was a real lifesaver. Small addition that the error exists on OS X 10.11.1 as well. |
I'd also like to add that I'm seeing this behavior in OS X 10.10.5 (Yosemite) |
I'm also experiencing this behavior when pressing SHIFT+TAB. OS X El Capitan 10.11.3 |
@brunnopleffken haha "SHIT + TAB" 😆 |
@alexandrudima I've verified fix for the insider's build. |
@alexandrudima looks great for stable too |
@philipgiuliani Oops! Mistyping an issue may cause situations like this, HAHAHAHA |
Just want to say thanks for the workarounds and the fixed update today. :) |
👍 +1 to that |
Thanks @alexandrudima . Appreciate the effort! |
Thanks for fixing this |
I wanted to indent multiple lines at once but it failed. This is how it looks like when I select some lines and press Tab. Sometimes it works though, like when creating an untitled file in split screen.
Quite important bug @egamma @jrieken @bpasero
The text was updated successfully, but these errors were encountered: