This repository has been archived by the owner on Aug 18, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
tabline.txt
188 lines (123 loc) · 5.95 KB
/
tabline.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
*tabline.txt* For NVIM v0.8.0 Last change: 2023 July 24
==============================================================================
Table of Contents *tabline-table-of-contents*
1. tabline.nvim |tabline-tabline.nvim|
2. Installation |tabline-installation|
3. Usage |tabline-usage|
4. Configuration |tabline-configuration|
5. Lualine tabline support |tabline-lualine-tabline-support|
This plugin is archived. Check out the following instead:
- https://github.com/backdround/tabscope.nvim
- https://github.com/tiagovla/scope.nvim
- https://github.com/nvim-lualine/lualine.nvim
------------------------------------------------------------------------------
==============================================================================
1. tabline.nvim *tabline-tabline.nvim*
A "buffer and tab" tabline:
- Show buffers and tabs in tabline
- Use same style as lualine by default
- Uses same section and component separators as lualine by default
- Bold buffers that are visible
- Ability to name tabs
- Toggle showing buffers per tabs
- Support nvim-web-devicons
- Works with sessions
==============================================================================
2. Installation *tabline-installation*
**Using Packer**
>lua
use {
'kdheepak/tabline.nvim',
config = function()
require'tabline'.setup {
-- Defaults configuration options
enable = true,
options = {
-- If lualine is installed tabline will use separators configured in lualine by default.
-- These options can be used to override those settings.
section_separators = {'', ''},
component_separators = {'', ''},
max_bufferline_percent = 66, -- set to nil by default, and it uses vim.o.columns * 2/3
show_tabs_always = false, -- this shows tabs only when there are more than one tab or if the first tab is named
show_devicons = true, -- this shows devicons in buffer section
show_bufnr = false, -- this appends [bufnr] to buffer section,
show_filename_only = false, -- shows base filename only instead of relative path in filename
modified_icon = "+ ", -- change the default modified icon
modified_italic = false, -- set to true by default; this determines whether the filename turns italic if modified
show_tabs_only = false, -- this shows only tabs instead of tabs + buffers
}
}
vim.cmd[[
set guioptions-=e " Use showtabline in gui vim
set sessionoptions+=tabpages,globals " store tabpages and globals in session
]]
end,
requires = { { 'hoob3rt/lualine.nvim', opt=true }, {'kyazdani42/nvim-web-devicons', opt = true} }
}
<
==============================================================================
3. Usage *tabline-usage*
:TABLINEBUFFERNEXT ~
Move to next buffer in the tabline.
:TABLINEBUFFERPREVIOUS ~
Move to previous buffer in the tabline.
:TABLINETABNEW {FILENAME1.EXT} {FILENAME2.EXT} ~
Open a new tab with these files.
:TABLINETOGGLESHOWALLBUFFERS ~
Toggles whether to show all buffers that are open versus only buffers that are
currently visible or bound.
:TABLINEBUFFERSBIND {FILENAME1.EXT} {FILENAME2.EXT} ~
Bind the current tab’s buffers to these files.
:TABLINEBUFFERSCLEARBIND ~
Clear the binding of current tab’s buffers.
:TABLINETABRENAME {NAME} ~
Rename current tab’s name.
==============================================================================
4. Configuration *tabline-configuration*
You can customize the behavior of this extension by setting values for any of
the following optional parameters.
TABLINE_SHOW_DEVICONS ~
Show devicons in tabline for each buffer (default = true)
TABLINE_SHOW_BUFNR ~
Show bufnr in tabline for each buffer (default = false)
TABLINE_SHOW_FILENAME_ONLY ~
Show only filename instead of shortened full path (default = false)
TABLINE_SHOW_LAST_SEPARATOR ~
Show separator after the last buffer or tab (default = false)
TABLINE_SHOW_TABS_ONLY ~
Show only tabs instead of tabs + buffers (default = false)
==============================================================================
5. Lualine tabline support *tabline-lualine-tabline-support*
`nvim-lualine/lualine.nvim` <https://github.com/nvim-lualine/lualine.nvim> now
has buffers and tabs as components. If you are not interested in binding
buffers to tabs, I’d recommend using those components. They work well in any
section.
If you’d still like to use tabline with lualine’s tabline instead, you can
do the following:
>lua
use {
'kdheepak/tabline.nvim',
config = function()
require'tabline'.setup {enable = false}
end,
requires = {'hoob3rt/lualine.nvim', 'kyazdani42/nvim-web-devicons'}
}
require'lualine'.setup {
tabline = {
lualine_a = {},
lualine_b = {},
lualine_c = { require'tabline'.tabline_buffers },
lualine_x = { require'tabline'.tabline_tabs },
lualine_y = {},
lualine_z = {},
},
}
<
Currently, this works best when the buffers and tabs are in section `lualine_c`
and `lualine_x` respectively. Support for other sections will be added in the
future.
==============================================================================
6. Links *tabline-links*
1. **: https://user-images.githubusercontent.com/1813121/128622268-173d2d40-a391-4fc7-b3ad-d10f2be97013.gif
Generated by panvimdoc <https://github.com/kdheepak/panvimdoc>
vim:tw=78:ts=8:noet:ft=help:norl: