Bug 431705 - Indentation mode can only globally changed.
Summary: Indentation mode can only globally changed.
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: indentation (other bugs)
Version First Reported In: 20.12.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-16 17:14 UTC by Dmitri Koulikoff
Modified: 2023-04-16 16:28 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitri Koulikoff 2021-01-16 17:14:54 UTC
SUMMARY

While the editor recognises the file types very well for syntax highlighting it fails to apply the proper indentation


STEPS TO REPRODUCE
1. Go to Config > Editing -> Indentation
2. Select "Default indentation mode" to None
3. Set "Indent using" to Tabs 4
4. Open a ruby file *.rb
5. Find/create any line that starts after more than 4 spaces from the left side
6. Place cursor at the end and press Enter

OBSERVED RESULT

At the beginning of the new line there will be tabs inserted


EXPECTED RESULT

At the begining of the new line must be only spaces


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

ADDITIONAL INFORMATION

With other rules there is the same situation. 
For example if you set TAB:8 opening a file that requires TAB:4 will not work properly.

In the previous version of Kate I can have file of different indention mode in the same Kate window. And all works perfect. But is was broken many years ago.
Now I can not have two files with different indentation mode in one window.
Comment 1 Christoph Cullmann 2023-04-16 16:28:33 UTC
Since some releases we support the auto detection of the indentation per file, that should solve the issue.

Beside that one can always use mode lines.