mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-18 12:00:23 +01:00
Additional function for displaying type of a current tag.
Introducing small function for displaying type (kind) of a current tag. Useful for putting it in the status bar.
This commit is contained in:
@@ -910,6 +910,17 @@ tagbar#currenttag({format}, {default} [, {flags}])
|
||||
%{tagbar#currenttag('[%s] ','')}
|
||||
< then the function "myfunc" will be shown as "[myfunc()] ".
|
||||
|
||||
Additionally you can show the kind (type) of the current tag, using following
|
||||
function:
|
||||
|
||||
tagbar#currenttagtype({format}, {default})
|
||||
{format} and {default} are treated in the same way as for
|
||||
tagbar#currenttag function.
|
||||
|
||||
Altering previous example, like below: >
|
||||
%{tagbar#currenttag('[%s] ','')}\ %{tagbar#currenttagtype("(%s) ", '')
|
||||
< the function "myfunc" will be shown as "[myfunc()] (function)".
|
||||
|
||||
Note that if there is an error when processing the current file no error
|
||||
message will be shown in order to not disrupt the statusline. If the function
|
||||
doesn't seem to work right open the Tagbar window to see any error messages.
|
||||
|
||||
Reference in New Issue
Block a user