Saturday, February 19, 2011

Re: Multiple Substitutes for 'includeexpr'

On 02/19/2011 06:11 PM, Roy Fulbright wrote:
> I am trying to use the 'gf' command to open the file containing the Perl
> module in a "use AB::CD::Module" statement. I included the following
> line in my .vimrc:
>
> set includeexpr=substitute(v:fname,'\\::','/','g')
>
> This translates the double colons to slashes in f:fname to form the path
> name, but I also need to add '.pm' to the end of v:fname. I tried adding
> a second substitute to the assignment, separated by the vertical bar
> (|), but this generates an error message while processing .vimrc.
>
> How can I apply more than one substitute to v:fname during the
> assignment to 'includeexpr'?
>
> Thanks,
> Roy Fulbright

Maybe I'm missing something but how about inserting the second
substitute as an arg to 1st substutite() ?

-Rainyday

--
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

No comments: