Another way to write ftplugin in order to optimized

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Another way to write ftplugin in order to optimized

Ni Va

I've written this ftplugin for awl language.

Is it possible to reduce time of folding because I have to work on files that contains many lines 130000 about and then many sections to fold.

I think the vimscript can be optimized :

function! GetFold(lnum)
        let currentLine = getline(a:lnum)
        let nextLine    = getline(a:lnum+1)
        if (currentLine =~ '\v^FUNC')
                                \ || (currentLine =~ '\v^DATA')
                                \ || (currentLine =~ '\v^TYPE')
                                \ || (currentLine =~ '\v^ORGA')
                return '>1'

Thank you


You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit

You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit

example.awl (916K) Download Attachment
awl.vim (772 bytes) Download Attachment