hi, vimmers.

I am writing a script in which it attempts to add a breakpoint on
current line if there defines a function.

" breakadd on current line
let pat = '\v^\s*:?fu(|n|nc|nct|ncti|nctio|nction)\s*!?\s*(\w+)\s*\(.{-}\)'
let m = matchlist(getline('.'), pat)
if len(m) > 3 && m[2] != ""
        exe "breakadd func" m[2]
else
        echo "No function definition on current line."
endif

As you can see, the most ugly part is the pattern:
'\v^\s*:?fu(|n|nc|nct|ncti|nctio|nction)\s*!?\s*(\w+)\s*\(.{-}\)'

Can you please help me to rewrite this pattern, especially the
part matches 'fu[nction]'? 

Thanks.
Please Cc me :)

-- 
Dasn


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to