[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Automatic indentation-detection in Kate and KDevelop
From:       Erlend Hamberg <ehamberg () gmail ! com>
Date:       2011-06-23 19:33:58
Message-ID: BANLkTikAdWcdXFVcSFFdK34-gZKbsd4NmQ () mail ! gmail ! com
[Download RAW message or body]

On 23 June 2011 19:46, Tirtha Chatterjee <tirtha.p.chatterjee@gmail.com> 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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic