From kwrite-devel Thu Jun 23 19:33:58 2011 From: Erlend Hamberg Date: Thu, 23 Jun 2011 19:33:58 +0000 To: kwrite-devel Subject: Re: Automatic indentation-detection in Kate and KDevelop Message-Id: X-MARC-Message: https://marc.info/?l=kwrite-devel&m=130885768709179 On 23 June 2011 19:46, Tirtha Chatterjee wrote: > This is exactly what I have in mind. Look at a max N lines (N is a > predefined const), > and prepare statistics, and based on that return the found values, along with a > percentage of accuracy. If accuracy is below a certain mark, we > fallback to default settings. > How does this sound? Sounds good to me. You could experiment a bit to see what works. 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 -- Erlend Hamberg ehamberg@gmail.com _______________________________________________ KWrite-Devel mailing list KWrite-Devel@kde.org https://mail.kde.org/mailman/listinfo/kwrite-devel