Replies: 4 comments 4 replies
|
If you have a file that already has an indent of 2 spaces, you will have 2 spaces despite your configuration. Try in a new file or format yours with 4 spaces manually (or using formatter). [[language]]
name = "c"
indent = { tab-width = 4, unit = " " }
[[language]]
name = "cpp"
indent = { tab-width = 4, unit = " " }Do you have 2 spaces identation only after saving file or even on typing? |
|
I just noticed that my C++ code (both existing and new files) are using two spaces instead of four (which is what they used to have). How do I change this? I just added but it doesn't seem to have any effect. This is |
|
The pasted config does not work. Solution 1: create new file, write some code that use 4 space as indentation, close it. Then open it with helix, it use 4 spaces now. Solution 2: create new file with helix, type |
|
It doesn't work for me either. The format in the languages.toml file is being ignored. This is what I've been doing:
Why is 2 spaces the default value? For C++, it should be 4. We should vote to learn what most people use and maybe update the default value. |
Uh oh!
There was an error while loading. Please reload this page.
Hi I am using the Helix text editor and my indents in C++ are just 2 spaces and I want them to be 4. I can't figure out how to make it work
I have been adding the indent to the languages.toml file as the docs tell me to:
I was on version 20.05 at first and I also tried on latest master but I alway just get 2 spaces in auto indent and when I press tab
I know the languages.toml file is getting picked up because if I change the style for the formatter that does take effect as expected. So just the indent key is not working as expected for me
All reactions