I'm looking for an elegant way in vimscript
to check if file exists in the current directory in a function.
I came up with this but not sure if that's the most elegant solution (I'll be setting vim option if it exists) - is there any way of not having to do another comparison of the filename - maybe use different vim
built-in function(?):
:function! SomeCheck()
: if findfile("SpecificFile", ".") == "SpecificFile"
: echo "SpecificFile exists"
: endif
:endfunction