[m-dev.] for review: mtags & skipping to pred definition
David Overton
dmo at cs.mu.OZ.AU
Sun Nov 19 23:35:51 AEDT 2000
On Sun, Nov 19, 2000 at 03:13:17AM +1100, Fergus Henderson wrote:
> This changes the user-visible behaviour of mtags.
> I prefer the new behaviour -- in fact it is what I had always
> intended, but until now hadn't figured out how to implement.
> But I suppose I should ask whether anyone prefers the current
> behaviour before committing this.
>
> I've tested this with vim 5.4 and with a couple of different
> versions of vi (the DEC OSF one and the SunOS one).
That's great Fergus. I tried to implement this myself a while ago and
gave up. I currently make do with a little macro:
:map <F6> /^\<^R^W\>^M
This will search for occurrences of the word at the current cursor
position that start in column 1. This will only work in Vim, not Vi,
but is extremely useful.
> + if ($kind eq "pred" || $kind eq "func") {
> + printf out "%s\t%s\t/^%s\$/;kq|/^%s/;'q\n",
I suggest you change that to
printf out "%s\t%s\t/^%s\$/;kq|/^\\<%s\\>/;'q\n",
so that it requires an exact word match.
> + $name, $file, $match_line, $name;
> + } else {
> + printf out "%s\t%s\t/^%s\$/;kq|-;/%s/;'q\n",
> + $name, $file, $match_line, $name;
> + }
Likewise here.
David
--
David Overton Department of Computer Science & Software Engineering
PhD Student The University of Melbourne, Victoria 3010, Australia
+61 3 8344 9159 http://www.cs.mu.oz.au/~dmo
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list