Assume a C source file with the following contents:
1 int main()
2 {
3 printf(This is main().\n);
4 return 0;
5 }
Position the cursor at the closing brace in line 5, perform:
echo searchpair('{', '', '}', 'cn')
echo searchpairpos('{', '', '}', 'cn')
Output (as expected):
5,
[5, 1]
Lech Lorens schrieb:
Assume a C source file with the following contents:
1 int main()
2 {
3 printf(This is main().\n);
4 return 0;
5 }
Position the cursor at the closing brace in line 5, perform:
echo searchpair('{', '', '}', 'cn')
echo searchpairpos('{', '', '}', 'cn')
Hi,
I think this is a bug. I hope it is just my version which is not recent enough
but I didn't find anything on the FAQ.
While inside a string : ( cursor
)
[( and ]) won't work.
Without the presence of a .vimrc it doesn't happen.
Just after:
2009/8/9 Andy Wokula anw...@yahoo.de:
What's the deal with using the 'c' flag together with searchpair()?
You can just omit it.
That's right. Contrary to the documentation it seems that this flag
has absolutely no effect on the result of the call. Or am I missing
something?
--
Cheers,
Lech
There are a number of plugins loaded by vim on startup (in the runtime/
plugins directory). Not everyone wants them to load all the time.
In order to suppress their loading, one must generally set a variable
specific to that plugin, which can only be known by perusing the
plugin itself.