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

Unable to force tabs for Makefile #76000

Closed
muuvmuuv opened this issue Jun 24, 2019 · 6 comments
Closed

Unable to force tabs for Makefile #76000

muuvmuuv opened this issue Jun 24, 2019 · 6 comments
Assignees
Labels
editor-autoindent Editor auto indentation issues editor-indent-detection info-needed Issue requires more information from poster
Milestone

Comments

@muuvmuuv
Copy link
Contributor

So there are existing issue but that didn't help me. VSCode is always preferring spaces in my Makefile. When I click in the bottom right to use tabs and switch to another file which uses spaces and go back to the makefile, VSCode is again using spaces instead of tabs. I expect VS Code to use only tabs and not to switch back to spaces when clicking between files that have different indention types.

Settings I apply:

{
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "editor.detectIndentation": true,
  "[makefile]": {
    "editor.tabSize": 4,
    "editor.insertSpaces": false,
    "editor.detectIndentation": false
  }
}
  • VSCode Version: 1.35.1
  • OS Version: macOS 10.14.5

Steps to Reproduce:

  1. Open a Makefile
  2. Change spaces to tabs
  3. Open a file e.g. test.js
  4. Go back to Makefile

Does this issue occur when all extensions are disabled?: Yes

@rebornix rebornix added the bug Issue identified by VS Code Team member as probable bug label Jul 26, 2019
@rebornix rebornix added the editor-autoindent Editor auto indentation issues label Oct 24, 2019
@louisabraham
Copy link

I'm going to go even further and say VSCode should automatically use tabs for makefiles as spaces break them.

@gilescope
Copy link

gilescope commented Apr 8, 2020

Hitting this on 1.41.1 / win10. Unless I set detectIndentation to false it does the wrong thing. Detect indentiaton does the wrong thing at the moment. Please get makefiles right as there's lots of them out there. (it does detect that it's a makefile - I get a pretty icon and it says on the status bar.)

@rebornix
Copy link
Member

rebornix commented Nov 4, 2020

@gilescope sorry for reaching out late. I'm not able to reproduce this issue currently, can you please share a sample makefile which you can reproduce this bug?

@rebornix rebornix added info-needed Issue requires more information from poster and removed bug Issue identified by VS Code Team member as probable bug labels Nov 4, 2020
@gilescope
Copy link

Alas I don't have the makefile in question any more. It was only a little one I made up with a few targets- wasn't anything fancy. Does the autodetection check the filename? a file called makefile is highly likely to be one, unlikely to go wrong there.

@muuvmuuv
Copy link
Contributor Author

Resolved I guess, haven't had it till now

@github-actions github-actions bot locked and limited conversation to collaborators Jun 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-autoindent Editor auto indentation issues editor-indent-detection info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

5 participants
@gilescope @rebornix @muuvmuuv @louisabraham and others