Re: matchit.vim et cetera
- Benji Fisher wrote:
> 3. Thanks for the suggestions. I'll save this for the next time I want toYou have to buy more memory! :-)
> compile. Unfortunately, when I run vcvars32, I get "Out of environment
> space" warnings, so I doubt it did any good.
I often get "Command line too long" errors, and then compiling won't work.
I need to remove some things before running "vcvars32"...
hundred-and-one symptoms of being an internet addict:
166. You have been on your computer soo long that you didn't realize
you had grandchildren.
/// Bram Moolenaar -- Bram@... -- http://www.moolenaar.net \\\
((( Creator of Vim - http://www.vim.org -- ftp://ftp.vim.org/pub/vim )))
\\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///
- Thus wrote Benji Fisher (benji@...) on :
> 2. It's not a big deal, just a matter of convenience. ConsiderWell, you could require the direction to be specified in a format
> MyFoo("forward") and YourFoo("backward"):
> fun MyFoo(direction)
> search("foo", a:direction)
expected by search(). This way, you can also, easily, use "w" and "W"
to overrule 'wrapscan'.
> fun YourFoo(direction)If you want to do something this simple, try
> if a:direction == "backward"
> let flag = "b"
> let flag = ""
> search("foo", flag)
call search("foo", a:direction =~? '^b\(ackward\)\=$' ? "b" : "")
(which happens to include my favorite way of handling cases "b" or
"backward" case insensitive.)
"Before you criticize someone, walk
Preben "Peppe" Guldberg __/-\__ a mile in his shoes. That way, if
c928400@... (o o) he gets angry, he'll be a mile away
----------------------oOOo (_) oOOo-- - and barefoot." --Sarah Jackson
- c928400@... wrote:
> Thus wrote Benji Fisher (benji@...) on :
> > 2. It's not a big deal, just a matter of convenience. Consider
>Of course, what I really have in mind is not that simple! ;)
> If you want to do something this simple, try
> fun AnotherFoo(direction)
> call search("foo", a:direction =~? '^b\(ackward\)\=$' ? "b" : "")
> (which happens to include my favorite way of handling cases "b" or
> "backward" case insensitive.)
I did say that it is a matter of convenience, so thank you for making
it more convenient. I did not know that C-style ?: had been added to vim
6.0: what fun! Thanks also for the reminder about =~?: I know about
this variant, but do not always remember to use it.