https://bugs.kde.org/show_bug.cgi?id=445792

            Bug ID: 445792
           Summary: Cannot properly configure tabs and spaces for project
                    indentation settings
           Product: kdevelop
           Version: 5.6.2
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: All editors
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: aar...@doofus.org
  Target Milestone: ---

SUMMARY
***
The C project I am working on uses a standard indentation of 4, but it should
use a combination of tabs and spaces when indenting. This can be set at the
global level, but not at the project level.

In the project source formatter settings for C using the Artistic style I went
to edit my style and changed where it says "spaces" to 4 to "tabs' and 4 but
this did not do what I expected. It basically totally screwed up my code in
such a way that it will be very painful for me to recover since I have made a
lot of changes since my last git commit. Every where my code was indented with
tabs and spaces the tabs were more or less doubled and even after undoing my
changes and going back to the global settings with tabs and spaces and a tab
width of 8 it is still showing a tab width of 4!

Furthermore, there is no help. I have no idea what "Force tabs" does.

The project formatter should be consistent with the global format settings but
this is not the case. I see no reason why the confusing project source format
settings differ from the global editor indentation settings. These should be
the same. The project formatter also needs the option to specify tabs and
spaces and to set the tab width to 8 characters and the indentation width to
something else, just like the global settings.

As it is, I see no way to undo the damage done to my source code since ^Z will
not undo the tab screwup. I also see no way to do tabs and spaces like is
possible with the global editor indentation settings.
***

STEPS TO REPRODUCE
1. Set the global editing indentation C style to use tabulators and spaces with
a tab width of 8 characters and indentation width of 4 characters.
2. Edit on some code using this style.
3. Create a new C artistic style for a project and set the indentation to
"Spaces" 4 then select Labels and Preprocessor directives to be indented and in
the Other tab make sure brackets are set to Linux.
4. Set this to override the editor indentation mode
5. Edit some code, notice it's using only spaces, not tabs and spaces
6. Change the project indentation to tabs
7. See all of the tabs now treated as 4 character tabs, not indentation of 4
characters with 8 character tabs!
8. Turn off the override editor indentation mode
9. Tabs are still 4 characters.
10. Change project indentation back to spaces but do not override editor
settings
11. It still uses spaces for indentation, not tabs like is set in the global
editor settings.1

OBSERVED RESULT
Everything gets screwed up

EXPECTED RESULT


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

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to