* Add g:tagbar_show_tag_count option
Closes#290
This option will show the tag kind count next to the kind label in the
tagbar window.
* Address review comments
* Add option to print the tag linenumber in the tagbar window
* Update documentation markup
* Change variable name to g:tagbar_show_tag_linenumbers to be more consistent with other variables
* Fix documentation
* Fix for window positioning
With default case having multiple vertically split windows, the tagbar
window should open on the far right of the screen. When the feature in
pull-request 630 was added, this behavior changed to open the tagbar
window relative to the current window. This commit will fix that by
allowing direct usage of the vim split options.
Validated the following cases for the old default values. These all
still behave the same way as prior to pull-request 630 when the tagbar
is activated in the `active` window shown in the below examples:
```
" No options
+-----------------------------------+
| preview |
+--------+--------+--------+--------+
| edit | edit | edit | tagbar |
| | active | | |
+--------+--------+--------+--------+
" tagbar on left, preview above
let g:tagbar_left = 1
+-----------------------------------+
| preview |
+--------+--------+--------+--------+
| tagbar | edit | edit | edit |
| | | active | |
+--------+--------+--------+--------+
" tagbar on bottom, preview to right of tagbar
let g:tagbar_vertical = 10
+--------+---------------+--------+
| edit | edit | edit |
| | active | |
| +-----+---------+ |
| | tag | preview | |
+--------+-----+---------+--------+
" tagbar on top, preview to the right of tagbar
let g:tagbar_left = 1
let g:tagbar_vertical = 10
+--------+-----+---------+--------+
| edit | tag | preview | edit |
| +-----+---------+ |
| | edit | |
| | active | |
+--------+---------------+--------+
```
New values also all validated using the following:
```
" Behaves the same as no options
let g:tagbar_position = 'right'
" Behaves the same as g:tagbar_left = 1
let g:tagbar_position = 'left'
" Behaves the same as g:tagbar_vertical = <#>
let g:tagbar_position = 'bottom'
" Behaves the same as g:tagbar_left = 1 | g:tagbar_vertical = <#>
let g:tagbar_position = 'top'
```
* #650 - Fix typo in doc/tagbar.txt for g:tagbar_height option
New configuration option for g:tagbar_position that will supercede g:tagbar_left. This option allows for new values for 'top', 'bottom', 'left' and 'right' (default:'right') to position the Tagbar window.
New configuration option for g:tagbar_height that will supercede g:tagbar_vertical. This option is used to set the Tagbar window height when the window is split using the 'top' or 'bottom' position.
New configuration option for g:tagbar_no_status_line. This option will disable any Tagbar status line updates in the event another plugin is controlling the status line. This prevents Tagbar from changing the status line when Tagbar is not the active window.
Co-authored-by: David Hegland <david.hegland@broadcom.com>
The current tagbar_autoclose state will be displayed in the statusline.
Also change the "hide nonpublic" flag to "v" to match the mapping and
properly document the statusline flags.
The current pause functionality simply removes all the autocommands to
stop updating Tagbar. This has the problem that at the moment the
statusline functions immediately restore the commands so pausing doesn't
work, but even if that didn't happen it would stop the statusline
functionality from working which is not desirable. The solution is to
have a reference to the paused file which will get used by the Tagbar
window, but not the statusline functions.
Changes requested by majutsushi.
Changed function to :TagbarTogglePause
Added documentation for function, including usage and defintion.
Changed autocommands_enable to autocommands_enabled.
tagbar#PauseAutocommands :TagbarPause
:TagbarPause pauses autocmds, effectively freezing Tagbar on the last
file. Useful for keeping a tag reference for a file open whilst working
in a different file.
Files are now cached locally in a temporary file, and the parsing
happens on that file. This allows displaying tags for remote (Netrw)
files, and it will also make access to files on remote filesystems like
NFS and sshfs faster.
Additionally, tags are now always updated when the files are saved,
deprecating the tagbar_updateonsave_maxlines option. Otherwise checking
for changes in remote files would not have been possible.