Is there any way, in a vim script, to get "dollar digit" variables such as those used in Perl to extract matched text? I have the following:
" $1 is not the variable in vim
exe "echo 'Found ".$1."'"
exe "echo 'Could not find name of corresponding file'"
I'm trying to find a Perl comment like this:
# cfile: somefile
And assign "somefile" to a variable. I've searched all over the Vim documentation for this and it seems to involve finding the starting and ending positions of the match and doing a bit of math and a extracting a substring. Tell me it's not this hard!