Commit Graph

130 Commits

Author SHA1 Message Date
Christian Brabandt
bc8fdfe946
terminal: correctly shorten terminal tabline
If there is a single terminal window in  the current tabpage, the whole
long command will be displayed in the tabline, even when it should be
shortened by default.

By default the title will not be shown if there are several windows in
the current tabpage, but if there is only one single terminal window, it
will still be shown (and might be a bit long). But I guess, it is better
to just show a possible too long terminal window name, than not show
anything).

fixes #2126
2020-06-21 22:31:43 +02:00
Christian Brabandt
29eec37c66
tabline: fix typo
related: #2103
2020-03-30 08:27:20 +02:00
kazukazuinaina
185bcc5e88 [add] new option / always show tab count feature 2020-03-30 01:06:06 +09:00
kazukazuinaina
cf6dcf5e19 update license's year in vim-airline 2020-01-06 11:22:49 +09:00
kazukazuinaina
60aaed01ae fix typo in tabline.vim 2019-12-15 21:28:51 +09:00
Christian Brabandt
9c3f84fc67
tabline: skip expansive BufAdd call on Session load
closes #2015
2019-12-13 08:44:15 +01:00
Christian Brabandt
758c83acbf
tabline: simplify autocommand condition 2019-12-12 09:58:21 +01:00
s1341
3f7222e488
Add support for vim-tabws tabline
closes #1938
2019-07-23 09:40:18 +02:00
Christian Brabandt
6acb234a12
tabline: Use separate hi group for label on right
if the same highlighting group is used on the left and right for the
label, the `airline_tablabel_to_airline_tabmod` will be overwritten on
the right side, causing the fg/bg colors to be wrong, because on the
right side they have to be the opposite of the left side.

So use a separate highlighting group for the tablabel on the right.

closes #1902
2019-04-17 09:04:56 +02:00
Christian Brabandt
c8a36e14e9
Updated Copyright Statements 2019-03-25 12:29:47 +01:00
Christian Brabandt
b84e548522
Make displaying the tab count optional
Set the g:airline#extensions#tabline#show_tab_count to zero to disable.

fixes complaints at #1882
2019-03-16 09:32:35 +01:00
Christian Brabandt
6ab14bf474
tabline: add consistent tab label to the end
closes #1882
closes #1883
2019-03-08 14:05:38 +01:00
Christian Brabandt
fd5bde1a3a
allow to show the statusline on top
This is an experimental feature that allows to display the statusline in
the tabline. It might still be a bit rough, but seems to work so far.

Remaining problem:
- Mode changes are not immediately detected, only after moving the
  cursor

fixes #1388
closes #1867
2019-02-03 17:30:55 +01:00
Christian Brabandt
6fd5b6ae56
tabline: Fix redrawtabline typo 2019-01-09 08:26:07 +01:00
Christian Brabandt
4604f6d465
tabline: Use :redrawtabline if available
this needs patch 8.1.706 and is a less hacky approach to force updating
the tabline
2019-01-09 07:42:32 +01:00
Christian Brabandt
a0298263b7
autocomd: do not re-evaluate modelines
fixes #1804
2018-09-25 16:03:30 +02:00
Christian Brabandt
012229fe08
tabline: Ignore buffers in buflist matching ignore_bufadd_pat
closes #1777
2018-09-20 10:26:32 +02:00
Christian Brabandt
b84e13f1d7
Blacklist startify for [noperm]
Startify unfortunately does not set the buftype option, so the
`[noperm]` would be shown, since the buffer is not really a file.
(see mhinz/vim-startify#324)

So allow to blacklist startify from this setting. To do so, the logic
from the tabline extension was refactored out into a separate function
that returns true, if the buffer matches
`g:airline#extensions#tabline#ignore_bufadd_pat` and that function is
then reused for the readonly() function as well.
2018-05-11 22:32:20 +02:00
mrmr1993
5907d3909e Add dedicated tabline builder 2018-03-15 16:38:36 +00:00
srini-x
7f1cfb0c3f removing the hard-coded '[' and ']' around the tabline labels. 2018-02-13 17:48:21 -08:00
Christian Brabandt
5db4c408bd
Update copyright notifications 2018-01-05 10:37:59 +01:00
Christian Brabandt
90cf752c90
tabline: add separate highlight group for labels 2018-01-04 18:57:28 +01:00
Christian Brabandt
3b631ef0c4
tabline: refactor label function 2018-01-04 18:43:03 +01:00
Christian Brabandt
45878a7947
tabline: remove l: prefix of function variables 2018-01-04 18:29:51 +01:00
Christian Brabandt
72e457d8c2
tabline: remove static caching of s:vars
rather let them be defined whenever they are needed. They were only used
inside a single function anyhow, so it does not make sense to cache
them. In addition, having the user later change the variable won't work
as expected.
2018-01-04 14:11:13 +01:00
Christian Brabandt
6e2a9e38cd
tabline: force redraw on BufAdd autocommands
closes #1580
2017-10-19 11:37:24 +02:00
Shohei Fujii
7bf1d9b1fb skip toggling ctrlspace tabline plugin 2017-10-16 17:33:40 +09:00
Christian Brabandt
a914cfb754
backout b2f301f73c
Backout commit b2f301f73c

First of all, it caused flicker (which is caused by a Vim bug:
https://groups.google.com/d/msg/vim_dev/fdgPqmYZwOk/KJzR4l9wAwAJA)

and then the cache was not reset when editing a new file.

So let's just revert that commit, although it does affect performance.

fixes #1499
2017-06-28 21:10:57 +02:00
Christian Brabandt
313a6fcad2
tabline: prevent flicker on Windows
calling settabvar() while evaluating the 'tabline' setting apparently
causes flicker on Windows. Fall back to using `:let t:var` to store the
content in the current tabpage.

This is not as good as using `settabvar()` since we cannot store the
title for other tabs, but at least it should prevent the flicker and at
the same time at least cache the title for the current tabpage.
2017-06-27 18:28:28 +02:00
Christian Brabandt
825aec9e4d
Revert "highlight: skip processing the same hi group twice"
This reverts commit feee9bcf3c.

It brakes CI and shouldn't be needed
2017-06-27 14:44:49 +02:00
Christian Brabandt
b2f301f73c
tabline: Cache title as tablocal variable 2017-06-27 14:40:31 +02:00
Christian Brabandt
feee9bcf3c
highlight: skip processing the same hi group twice
Shouldn't happen, but just in case skip creating highlighting group,
if the same group with the same attributes has already been defined.
2017-06-26 23:17:43 +02:00
Christian Brabandt
f5359f9177 do not skip empty sections for the tabline
commit #3d667c32d3ac04 fixed a bug, that a section was not considered
empty for the statusline, also g:airline_skip_empty was set.

However unfortunately, this lead to a regression, makeing the tabline
ugly, because sections, that contained a single highlighting group would
be considered empty and would therefore be skipped. Since this is not
what is expected, make s:section_is_empty() return zero, when it notices
we are looking at a tabline.

fixes #1273
2016-09-27 21:44:00 +02:00
thawk
45d77ca909 Add 'scriptencoding utf-8' to all scripts 2016-09-24 08:16:30 +08:00
Daniel Hahler
63dc4ba2a4 tabline: do not change the signature of get_buffer_name
Thanks to @wsdjeg about notifying me in
https://github.com/vim-airline/vim-airline/commit/e1f7bf#commitcomment-18104843.

Fixes: https://github.com/vim-airline/vim-airline/issues/1204.
2016-07-02 16:24:47 +02:00
Daniel Hahler
8d681c7119 Tabline performance: only pass in visible buffers to formatters
This only passes in the list of visible buffers on that tab, which
reduces the processing a lot if you have a lot of buffers opened.
2016-06-17 15:07:55 +02:00
Joshua Rubin
73146e3e73 Add support for getting tab title from t:title
Uses `gettabvar` to get tab name.
2016-03-22 12:14:47 -06:00
Christian Brabandt
f60a8cc7a3 another approach for updating the bufferline on BufAdd 2016-03-01 22:07:52 +01:00
Christian Brabandt
0e70dac030 Disable tabline refresh per configuration
fixes #1049 and should prevent that users see AirlineTabRefresh printed
on their screen.
2016-02-23 20:23:29 +01:00
rosston
63f9abd3f2 Fix highlighting of current/modified buffer.
Fixes broken variable reference caused by e4ef624 (#952).
2016-02-22 23:07:27 -05:00
Christian Brabandt
2c5aa75d5f update according to PR comments 2016-02-11 21:31:42 +01:00
Bailey Ling
e4ef624ea8 tabline for combined buffers/tabs
This is a new tabline extension, that displays both the buffers open and
the available tabs. This has been requested by #639 and fixes #639.

This is based on blings work on branch spike.

This uses the new highlight groups tab*_right, so that the separators
have the correct color. Also this makes some configuration variable
obsolete and therefore, they have been removed.

remove unused combined config variable, remove space after tab
2016-02-10 20:22:35 +01:00
Christian Brabandt
08a8779268 do not echo feedkeys() arguments
Try a different approach, that does not echo
the commandline. For that, create a <silent> mapping,
that is called via feedkeys() and as such should update the tabline.

fixes #1011
2016-02-08 21:16:38 +01:00
Christian Brabandt
b48b166a22 Merge pull request #911 from sappo/master
Problem: CtrlSpace 5.0 integration (statusline + tabline)
2016-02-08 10:44:01 +01:00
Kevin Sapper
a65000211f Problem: Load check variables has changed
Solution: Use the current one from ctrlspace 5.0 + minor style fixes

Problem: CtrlSpace 5.0 does no longer work with airline
Solution: Modify the ctrlspace extension to call the new APIs

The statusline work fine but the custom ctrlspace function
somehow/somewhere gets overridden and I could not figure out where.
Therefore the user must add

let g:CtrlSpaceStatuslineFunction = "airline#extensions#ctrlspace#statusline()"

to its .vimrc.

Problem: Ctrlspace 5.0 does not integrate well into tabline
Solution: Write a tabline extensions for ctrlspace 5.0.

The extensions is capable of showing both tabs and buffers, but only the
buffers of a current tab are shown.
2016-02-08 08:36:25 +01:00
Christian Brabandt
af3f209d7a Try to avoid excessive redraws.
Most of them seem to be caused by using :hi statements, although the
highlighting group to be created is exactly the same. Therefore, get the
info from actual definition and only execute :hi when the new group is
actually different.

Also try to avoid to generate :hi statements when the popupmen is
visible. This causes flickers.
2016-02-06 13:55:28 +01:00
Christian Brabandt
73f365cfb9 use feedkeys() with "n" flag 2016-02-06 08:49:50 +01:00
Christian Brabandt
050945f087 update_tabline() may cause E315
This is probably a bug in Vim because redrawing might cause
Vim to actually try to access a line of the buffer, that hasn't
been loaded yet.

Therefore try to update the tabline, by performing a two :set mod!
calls.
2016-02-06 00:03:27 +01:00
Christian Brabandt
87d60febaf fix neovim color mode 2016-02-05 22:47:57 +01:00
Andrea Schiavini
ef3746d022 Neovim support 2016-02-05 09:19:31 +01:00