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
|  
Report Content as Inappropriate

Another way to write ftplugin in order to optimized

Ni Va
Hi,

I've written this ftplugin for awl language.
https://cache.industry.siemens.com/dl/files/446/45523446/att_79269/v1/s7awl__b.pdf

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 http://www.vim.org/maillist.php

---
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 https://groups.google.com/d/optout.

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