Bug 153564 - Indentation problem when using file->new
Summary: Indentation problem when using file->new
Status: RESOLVED DUPLICATE of bug 142087
Alias: None
Product: kate
Classification: Applications
Component: indentation (other bugs)
Version First Reported In: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-06 14:56 UTC by Matthias
Modified: 2008-12-30 16:11 UTC (History)
1 user (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 Matthias 2007-12-06 14:56:17 UTC
Version:           2.5.7 (using KDE KDE 3.5.7)
Installed from:    SuSE RPMs
OS:                Linux

Indentation does not work when creating a new file with file->new.
It works when kate is started in the default document. it also works in loaded documents
just not when using file->new.
there was one similar bugreport where the problem was that in the session file the settings for document 0 where indentation "none" this is not the case here, its set to "1" (normal).
Comment 1 Anders Lund 2007-12-08 12:14:13 UTC
For Kate to decide what sort of indentation to use, It needs to know a) the (mime) type of the file and b) what indentation to use for that file type.

b) should be set up using file types.
I can't remember if we ship such setups, but I have a file type that makes C style indentation the one for several C-style code lanuages (C, C++, Java ...)

For a), you have to either save the document (then kate will detect the mime type) or select a file type from Tools->File type.

An other alternative would be to set a default indentation type suitable for your language, but it would then always be used for files where nothing else were chosen.
Comment 2 Matthias 2007-12-08 13:04:41 UTC
I think i might not have described the problem very well so i will try again:
i start kate with no file opened and no parameter.
i write 
test <return><tab>test<return> 
the cursor ends up at column 2 (1 level indented, tabsize is 2).
then i do file->new and write the same
test <return><tab>test<return> 
the cursor ends up in column 0, not indented.


Comment 3 Anders Lund 2007-12-10 20:16:26 UTC
I can confirm that with Kate 2.5.8, and that is indeed odd.
The indenter is set to 'normal' in both documents, but it hasent been set in the new document - if i set it actively it works.

In Kate 3.0 the indentation is unset for new documents.
Comment 4 FiNeX 2008-05-05 15:22:45 UTC
Isn't this a dup of bug #142087 ?
Comment 5 FiNeX 2008-12-30 16:11:17 UTC

*** This bug has been marked as a duplicate of bug 142087 ***