Bug 342321 - Kate autoindents after setting Tools>Indentation = 'None'
Summary: Kate autoindents after setting Tools>Indentation = 'None'
Status: CONFIRMED
Alias: None
Product: frameworks-ktexteditor
Classification: Frameworks and Libraries
Component: indentation (other bugs)
Version First Reported In: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 338236 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-12-30 00:19 UTC by xlovitt
Modified: 2019-05-19 11:03 UTC (History)
3 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 xlovitt 2014-12-30 00:19:15 UTC
Happens after restarting or while using Kate.  When editing C source files, Kate>Tools>Indentation pops into 'C Style' mode after setting it to 'None'.   Kate>Settings>Configure_Kate...>Editing>Indentation(tab)>Default indentation mode: = 'None'.

Some system info:

OS (recent upgrade)   =  OpenSuse 13.1
kernel (uname -r)        =  3.11.10-25-desktop
KDE platform Version  =  4.11.5
Kate Version                =  3.11.5
Comment 1 Boris Egorov 2015-01-10 13:17:25 UTC
I'm not sure it is a bug. If you open 'whatsThis' of Indentation tab, you'll see: "This is a list of available indentation modes. The specified indentation mode will be used for all new documents. Be aware that it is also possible to set the indentation mode with document variables, modes or a .kateconfig file."

So, it really works for new files. If you save a file with .c extension, kate understands it is a C source file and sets indentation to 'C Style'. You can set needed behavior to C filetypes in: Settings->Configure_Kate->Open/Save->Modes & Filetypes
Filetype: Sources/C
Indentation Mode: None (or Default, if you set it to None).
Comment 2 xlovitt 2015-01-14 05:17:02 UTC
Thanks for your reply.  I had already tried your suggestions by the time the complaint was sent to you, but the problem persisted, so Kate was uninstalled from the system.  I've had several updates to my distro (UBUNTU 14.04), including several KDE updates.  After receiving your email, I installed Kate and found that the indentation problem was gone.  Thanks for all your good work.

--------------------------------------------
On Sat, 1/10/15, Boris Egorov <egorov@linux.com> wrote:

 Subject: [kate] [Bug 342321] Kate autoindents after setting Tools>Indentation = 'None'
 To: xlovitt@yahoo.com
 Date: Saturday, January 10, 2015, 8:17 AM
 
 https://bugs.kde.org/show_bug.cgi?id=342321
 
 Boris Egorov <egorov@linux.com>
 changed:
 
            What 
   |Removed           
          |Added
 ----------------------------------------------------------------------------
              
    CC|         
                
   |egorov@linux.com
 
 --- Comment #1 from Boris Egorov <egorov@linux.com>
 ---
 I'm not sure it is a bug. If you open 'whatsThis' of
 Indentation tab, you'll
 see: "This is a list of available indentation modes. The
 specified indentation
 mode will be used for all new documents. Be aware that it is
 also possible to
 set the indentation mode with document variables, modes or a
 .kateconfig file."
 
 So, it really works for new files. If you save a file with
 .c extension, kate
 understands it is a C source file and sets indentation to 'C
 Style'. You can
 set needed behavior to C filetypes in:
 Settings->Configure_Kate->Open/Save->Modes &
 Filetypes
 Filetype: Sources/C
 Indentation Mode: None (or Default, if you set it to None).
 
 -- 
 You are receiving this mail because:
 You reported the bug.
Comment 3 xlovitt 2015-01-18 17:21:07 UTC
Boris,  My mistake on my last reply to you .. I was confusing the Kate on another Ubuntu machine with this Opensuse model.  
The indentation persistence issue still exists in the Opensuse computer running KDE desktop.

Is 'what'sThis' the '?' button of the Indentation tab?  I'm assuming that "Indentation tab" is:
Kate: Settings: Configure Kate: Editing: Indentation <tab>

If so, then clicking that button and then the 'Default indentation mode' select gives:

"This is a list of available indentation modes.  
 The specified indentation mode will be used for
 all new documents.  Be aware that it is also
 possible to set the indentation mode with 
 document variables, modes, or a .kateconfig
 file."

I tried to change all '.kateconfig' files that seemed to be referenced in the Kate help screens with no effect.
I tried to change all modes relating to indentation with no effect.
I was able to defeat the autoindentation with the following document variable string located on the 
first line of source code files:

'// kate: replace-tabs on; indent-width 2; indent-mode cstyle;'

Any comments as to why the .kateconfig files have no apparent effect on global indentation settings?



--------------------------------------------
On Sat, 1/10/15, Boris Egorov <egorov@linux.com> wrote:

 Subject: [kate] [Bug 342321] Kate autoindents after setting Tools>Indentation = 'None'
 To: xlovitt@yahoo.com
 Date: Saturday, January 10, 2015, 8:17 AM
 
 https://bugs.kde.org/show_bug.cgi?id=342321
 
 Boris Egorov <egorov@linux.com>
 changed:
 
            What 
   |Removed           
          |Added
 ----------------------------------------------------------------------------
              
    CC|         
                
   |egorov@linux.com
 
 --- Comment #1 from Boris Egorov <egorov@linux.com>
 ---
 I'm not sure it is a bug. If you open 'whatsThis' of
 Indentation tab, you'll
 see: "This is a list of available indentation modes. The
 specified indentation
 mode will be used for all new documents. Be aware that it is
 also possible to
 set the indentation mode with document variables, modes or a
 .kateconfig file."
 
 So, it really works for new files. If you save a file with
 .c extension, kate
 understands it is a C source file and sets indentation to 'C
 Style'. You can
 set needed behavior to C filetypes in:
 Settings->Configure_Kate->Open/Save->Modes &
 Filetypes
 Filetype: Sources/C
 Indentation Mode: None (or Default, if you set it to None).
 
 -- 
 You are receiving this mail because:
 You reported the bug.
Comment 4 Christoph Cullmann 2018-08-17 19:05:32 UTC
Yes, just setting the indentation to none in the "Modes" configuration e.g. for C++ doesn't seem to work, it still takes cstyle indentation like configured in the shipped C++ hl file.
Comment 5 Christoph Cullmann 2018-08-17 21:11:19 UTC
*** Bug 338236 has been marked as a duplicate of this bug. ***