Friday, June 9, 2017

Another way to write ftplugin in order to optimized

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 vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: