NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
I'm guessing matchstr is what you're after (Score:2)
Re:I'm guessing matchstr is what you're after (Score:1)
Unfortunately
matchstr()operates on a string, not the current buffer, so you've first of all had to read the current line into a string.This has the distinct disadvantage that it only works if you already happen to be on the line that you're looking for.
Smylers
Re:I'm guessing matchstr is what you're after (Score:2)
I'm relying on some inside information to guess that he's expecting to be on the line when he uses this command. I could be wrong.
We used to work at the same shop where we had a bunch of shortcuts that worked in that sort of fashion (go to test, implementation, module, base class, mason component).
Re:I'm guessing matchstr is what you're after (Score:2)
Out of curiosity, how did you learn Vim scripting? Is there a decent tutorial out there or did you go through the docs?
Re:I'm guessing matchstr is what you're after (Score:2)
I'm not sure I'd say that I've learned it. When I started at Rentrak, they already had
> Is there a decent tutorial out there or did you go through the docs
There may well be a decent tutorial. If so, I never found it. Instead I spent way to much time banging m
Grab It To a Register (Score:1)
If you change the pattern just to position the cursor at the point you're interested in then you can yank the next word into a register with a separate command:
If however, as suggested by the name of your function, your actual desire is not to put the filename into a variable but to go
Re:Grab It To a Register (Score:2)
Thanks! That's useful information. I have to admit, I'm thinking about Emacs just because I find the Vim docs so intensely painful. I'm not Stephen Hawking, but I'm not particularly stupid, either. I don't know why I have such trouble with the Vim docs, but I do. This really should have not been so hard to figure out :/