Version: (using KDE KDE 3.4.1) Installed from: Gentoo Packages When opening a file in Kate, it should be possible to guess settings for "Use spaces instead of tabs to indent" and "Number of spaces" and set them on a per-file basis. Now if I open someone else's file I can continue with their indentation method.
On Tuesday 19 July 2005 18:43, Full Decent wrote: > When opening a file in Kate, it should be possible to guess settings for > "Use spaces instead of tabs to indent" and "Number of spaces" and set them > on a per-file basis. Now if I open someone else's file I can continue with > their indentation method. Like other editors, katepart provides to specify settings in the file. Read about it in the documentation. As for content based analysis, code would eb wellcome :)
Here is a python script that automatically detects the specified tab-width and indent-width: http://www.freehackers.org/Indent_Finder This could be translated to javascript and then even be executed by KatePart itself.
*** Bug 194014 has been marked as a duplicate of this bug. ***
In a discussion on kwrite-devel, someone wrote: > I know of the following scripts for Vim that does auto-detection of > indent settings, perhaps you could look at them to come up with some > initial ideas: > > https://github.com/ciaranm/detectindent > https://github.com/vim-scripts/yaifa.vim See http://lists.kde.org/?l=kwrite-devel&m=130885768709179
Has there been any activity on this during the last two years? I often use KDevelop to edit files in multiple projects with different indetation style (Tabs/Spaces) and it's quite annoying having to manually switch every time.
*** This bug has been confirmed by popular vote. ***
> Has there been any activity on this during the last two years? Hi, not really, sorry. Any patch is very welcome, thought it must work in a way that doesn't interfere with the settings given by the user for that file.
Dear user, this wish list item is now closed, as it wasn't touched in the last year and no contributor stepped up to implement it. The Kate/KTextEditor team is small and we can just try to keep up with fixing bugs. Therefore wishes that show no activity for a years or more will be closed from now on to keep at least a bit overview about 'current' wishs of the users. If you want your feature to be implemented, please step up to provide some patch for it. If you think it is really needed, you can reopen your request, but keep in mind, if no new good arguments are made and no people get attracted to help out to implement it, it will expire in a year again. We have a nice website https://kate-editor.org that provides all the information needed to contribute, please make use of it. Patches can be handed in via https://phabricator.kde.org/differential/ Greetings Christoph Cullmann
I think this would be useful. *Very* useful.
Implemented in KF 5.90 https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/253
Woohoo!