Skip to content

Update the Vim script functionList #272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"leaves":["build_go_files"],"root":"unitTest"}
{"leaves":["build_go_files","F","Baz","g","H","foo","namespaced#function","Another#namespaced#function"],"root":"unitTest"}
34 changes: 34 additions & 0 deletions UDL-samples/Vimscript_by_rdipardo.vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,38 @@ func! s:build_go_files() abort
endif
endfunc

"""""""""""""""""""
" Tests "
"""""""""""""""""""
function F(x)
echom 'Pass'
endfunction

func Baz(x, y)
echom 'Pass'
endfunc

function! s:g(x)
echom 'Pass'
endfunction

function! s:H(x)
echom 'Pass'
endfunction

func! s:foo(x, y)
echom 'Pass'
endfunc

func! namespaced#function(...)
echom 'Pass'
endfunc

func! Another#namespaced#function(...)
echom 'Pass'
endfunc

" func IgnoreMe()
" endfunc

" vim: syntax=vim
8 changes: 4 additions & 4 deletions functionList/Vimscript_by_rdipardo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
<!-- based on rules https://learnvim.irian.to/vimscript/vimscript_functions -->

<parser
id="vimscript_fuunc"
id="vimscript_func"
displayName="Vim Script"
commentExpr="(?-s:#.*)"
commentExpr="(?-s:&quot;.*)"
>
<function
mainExpr="^\h*func(tion)?!?\h+(?-i:\u|s:\l?)\w+"
mainExpr="^\h*func(tion)?!?\h+(?-i:\u|(s:(?!\w+#)|(\w+#)+)\l?)(#?\w)*"
>
<functionName>
<nameExpr expr="^\h*func(tion)?!?\h+\K(?-i:\u|s:\K\l?)\w+" />
<nameExpr expr="^\h*func(tion)?!?\h+\K(?-i:\u|(s:\K|(\w+#)+)\l?)(#?\w)*" />
</functionName>
</function>
</parser>
Expand Down