You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preview the function signature circularly in the command line:
PreviewSignature[!][function name]
If the function name is not provided, current word under cursor will be taken as function name.
If bang ! sign is given, the nearest function name to the cursor position is chosen.
Seems that with a bang given, the first argument passed to preview#function_echo() will be '<?>'. And preview#function_echo() is just a simple wrapper around preview#function_define() by passing its first parameter to it. But when I digged a little deeper into that function, I noticed the following lines, which a:name is indeed funcname occurring above:
ifa:name==''let name =preview#function_guess(line[0:endpos])
elseifa:name=='<?>'let name =expand('<cword>')
elselet name =a:nameendif
Surprisingly, if a;name is '<?>', which is the circumstance we expect to have a 'guess' about the nearest function name by giving a bang adhering the 'PreviewSignature' command, what the function does is only picking the word under the cursor. However without a bang, an inner function called preview#function_guess() would try to guess the nearest function name. The command just behave conversely against the documentation.
The text was updated successfully, but these errors were encountered:
In README.md, it was introduced:
But in the script, it was written:
Seems that with a bang given, the first argument passed to preview#function_echo() will be '<?>'. And preview#function_echo() is just a simple wrapper around preview#function_define() by passing its first parameter to it. But when I digged a little deeper into that function, I noticed the following lines, which a:name is indeed funcname occurring above:
Surprisingly, if a;name is '<?>', which is the circumstance we expect to have a 'guess' about the nearest function name by giving a bang adhering the 'PreviewSignature' command, what the function does is only picking the word under the cursor. However without a bang, an inner function called preview#function_guess() would try to guess the nearest function name. The command just behave conversely against the documentation.
The text was updated successfully, but these errors were encountered: