-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
Display 2 spaces instead of 4 without changing the code or project settings #132776
Comments
I guess my feature request is really similar to this one: I'd like to see 2 spaces as 4 (so for the opposite reason of this request) without changing the actual code because I prefer a more stretched out view. I thought a good solution would be to control the width of one indentation space in pixels for instance. |
@seahindeniz @buondevid Checkout https://marketplace.visualstudio.com/items?itemName=kylepaulsen.stretchy-spaces, might be helpful. |
Hey @ceoshikhar thanks for the suggestion! The extension isn't compatible with built-in guidelines and has rendering issues, so it suggests another extension, which has noticeable bugs as well.
Better yet, I would like this feature to be added to VSCode as a built-in feature, rather than having an extension that depends on APIs that doesn't give full support to line rendering functionality |
This issue would improve accessibility as it would allow people to more easily view repos that use spaces. There is an issue in prettier about switching to tabs by default (prettier/prettier#7475), but it's not a real fix for the accessibility concerns compared to something like this (along with improvements to other tooling such as GitHub's rendering). |
A suggestion like this is an actual fix for accessibility concerns, unlike suggestions elsewhere to change entirecodebases over! Can we get this added in such a way so that x-spaces can be folded into y-spaces or a tab in a configurable manner? I think many braille users would appreciate being able to fold 4 spaces into a tab, for example. |
It would indeed be great for viewers of a repo that has chosen spaces not to have to suffer from that choice - the best choice is that they use tabs, but this sounds second-best. |
i would like to see this too. i am a newbie to ligatures, but can a ligature solve this? i.e. render 4 spaces to a ligature of width 2. |
I would think something like an "indentation multiplier" makes sense. Either a manual setting that people can set to Each indentation character would have its width multiplied by that. |
Another +1 to this. Everyone has their own preference for 2/4/3(??) sized indents. Reading all code at work, home, and various languages at the same indent size could really help to pattern detect quickly and ease in to new languages. With the recent work to make spaces act as tabs as much as possible, it seems this might be really close! |
fully agree! same request here! |
bump! |
+1. My company has coding guidelines that require indentation to be 4 spaces but I prefer 2 spaces. Simply being able to visually change this without conflicting with the codebase would be amazing! |
Yes people, I need this one like an air. I've got brain damaged from 4 tabspaces today. Wish me better mental health. |
Darn, if only there were a special character that could change width depending on the user's preference :) |
Temporary workaround: https://github.com/kylepaulsen/vscode-stretchy-spaces It would be fantastic for this feature to be natively supported. I'm editing a 2-space codebase but I'd prefer to render as 4-spaces without affecting the source code file. |
It would be nice if VS Code could take code indented with spaces and render it with tabs on the fly without changing the underlying file. I doubt there's significant use for leading spaces that aren't a multiple of the indentation level anyway. This would be very helpful for people like me who use a proportional font for coding, since spaces in proportional fonts are typically pretty narrow. |
+1 ! |
Hi, I'm working on projects that requires 4 space indentation, but I find this rule is a bit irritating. Is it possible to have an option to change the displaying/rendering behavior to show 4 spaces as 2 space without actually changing the spaces in the code. Such functionality would also need to work when I want to create a new file with projects indentation requirements, but would still render 4 spaces as 2.
The text was updated successfully, but these errors were encountered: