Bug 444647 - Editor inserting tabs instead of spaces
Summary: Editor inserting tabs instead of spaces
Status: REPORTED
Alias: None
Product: kdevelop
Classification: Applications
Component: All editors (show other bugs)
Version: 5.6.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-30 06:01 UTC by Aaron Williams
Modified: 2021-10-30 10:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Williams 2021-10-30 06:01:20 UTC
I have configured KDevelop to only use spaces rather than tabs and spaces for indentation with an indentation of 4. Even with this setting, KDevelop continues to insert tabs when I hit the tab key twice for indentation. It should only use spaces to follow the coding standard of this project.


STEPS TO REPRODUCE
1. Go to Settings->Configure KDevelop
2. Select Editor->Editing
3. Set C style
4. Set Tab widthn to 8 characters, Indentation width to 4 characters then indent using spaces only.
5. Start editing code and hit the tab key twice when it makes sense, a tab is inserted instead of 8 spaces.

Also of note I have multiple KDevelop projects open in different sessions, many of which use a different indentation. Most other projects use an Indentation width of 88 and use Tabulators and Spaces.

OBSERVED RESULT
When indenting to 8 spaces a tab character is inserted

EXPECTED RESULT
8 space characters should be inserted

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Igor Kushnir 2021-10-30 08:31:17 UTC
This bug report describes only configuration inherited from KTextEditor. Please check if the same issue applies to Kate. If so, change Product to frameworks-ktexteditor. Otherwise, this could be an issue with your configured KDevelop source formatter. Configure it to match your preferred code style too (in per-session or per-project settings).
Comment 2 Sven Brauch 2021-10-30 08:37:45 UTC
Another reason might be a special configuration for the file type you are editing. Please try checking that. It's very unlikely that something is broken here.
Comment 3 Aaron Williams 2021-10-30 10:45:57 UTC
The file type was correct (C files).
Comment 4 Aaron Williams 2021-10-30 10:49:48 UTC
What might be confusing KDevelop is the fact that I have multiple sessions active simultaneously with different settings for each session due to the fact that indentation is not an option on a per-project basis like it should be.