mirror of
https://github.com/gryf/tagbar.git
synced 2025-12-17 11:30:28 +01:00
Add more flexible options for window positioning (#630)
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>
This commit is contained in:
@@ -184,7 +184,7 @@ There are essentially two ways to use Tagbar:
|
||||
Opening and closing the Tagbar window~
|
||||
Use |:TagbarOpen| or |:TagbarToggle| to open the Tagbar window if it is
|
||||
closed. By default the window is opened on the right side, set the option
|
||||
|g:tagbar_left| to open it on the left instead. If the window is already open,
|
||||
|g:tagbar_position| to open it elsewhere instead. If the window is already open,
|
||||
|:TagbarOpen| will jump to it and |:TagbarToggle| will close it again.
|
||||
|:TagbarClose| will simply close the window if it is open.
|
||||
|
||||
@@ -426,10 +426,34 @@ This causes ctags to use settings from ~/.vim/ctags.cnf, ignoring other
|
||||
configuration files.
|
||||
|
||||
|
||||
*g:tagbar_position*
|
||||
g:tagbar_position~
|
||||
Default: 'right'
|
||||
|
||||
By default the Tagbar window will be opened on the right-hand side of vim. Set
|
||||
this option to one of 'left', 'right', 'bottom', or 'top' to open in the
|
||||
corresponding position instead. This can be useful when activating Tagbar at
|
||||
the same time as another plugin which creates a new window. It allows for more
|
||||
granular control of the Tagbar position in relation to the current active
|
||||
window.
|
||||
|
||||
If set to 'top' of 'bottom', |g:tagbar_height| will be used to determine the
|
||||
window height for the tagbar window.
|
||||
|
||||
if set to 'left' or 'right', |g:tagbar_width| will be used to determine the
|
||||
window width for the tagbar window.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_position = 'left'
|
||||
<
|
||||
*g:tagbar_left*
|
||||
g:tagbar_left~
|
||||
Default: 0
|
||||
|
||||
This option has been superceded by |g:tagbar_position| instead. It has been left
|
||||
around for backward compatibility.
|
||||
|
||||
By default the Tagbar window will be opened on the right-hand side of vim. Set
|
||||
this option to open it on the left instead.
|
||||
|
||||
@@ -445,6 +469,9 @@ Example:
|
||||
g:tagbar_vertical~
|
||||
Default: 0
|
||||
|
||||
This option has been superceded by |g:tagbar_height| instead. It has been left
|
||||
around for backward compatibility.
|
||||
|
||||
If this is set to a positive value then the Tagbar window will be opened at
|
||||
the top or bottom of the Vim window instead of at the side. This can be useful
|
||||
for monitors that have been rotated into a vertical position. The value of
|
||||
@@ -456,11 +483,24 @@ Example:
|
||||
let g:tagbar_vertical = 30
|
||||
<
|
||||
|
||||
*g:tagbar_height*
|
||||
g:tagbar_height~
|
||||
Default: 0
|
||||
|
||||
If |g:tagbar_position| is set to 'bottom' or 'top', then this value is used to
|
||||
determine the height of the Tagbar window.
|
||||
See |g:tagbar_left| for configuring the position of the window.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_height = 30
|
||||
<
|
||||
*g:tagbar_width*
|
||||
g:tagbar_width~
|
||||
Default: 40
|
||||
|
||||
Width of the Tagbar window in characters.
|
||||
If |g:tagbar_position| is set to 'left' or 'right', then this value is used to
|
||||
determine the width of the Tagbar window in characters.
|
||||
|
||||
Example:
|
||||
>
|
||||
@@ -778,6 +818,19 @@ default statusline:
|
||||
endfunction
|
||||
let g:tagbar_status_func = 'TagbarStatusFunc'
|
||||
<
|
||||
*g:tagbar_no_status_line*
|
||||
g:no_status_line~
|
||||
Default: undefined
|
||||
|
||||
This option will prevent any status line updates being done by Tagbar. Use
|
||||
this in the event where another plugin is being used to update the status
|
||||
line. If |g:tagbar_status_func| is set, then that function will never be
|
||||
called.
|
||||
|
||||
Example:
|
||||
>
|
||||
let g:no_status_line = 1
|
||||
<
|
||||
|
||||
*g:tagbar_silent*
|
||||
g:tagbar_silent~
|
||||
@@ -789,6 +842,7 @@ about the tag is echoed out. Set this option to disable that behavior.
|
||||
Example:
|
||||
>
|
||||
let g:tagbar_silent = 1
|
||||
<
|
||||
*g:tagbar_use_cache*
|
||||
g:tagbar_use_cache~
|
||||
Default: 1
|
||||
|
||||
Reference in New Issue
Block a user