Commit Graph

62 Commits

Author SHA1 Message Date
kazukazuinaina
fab1ee3117 [update] license's year in airline's extension 2020-06-11 05:26:04 +09:00
kazukazuinaina
6115527e7e [fix] conut variable's scope 2020-02-28 17:14:45 +09:00
Jonathan Feinberg
892c9ad6b5
Adding option: buffers#buffer_idx_mode = 3
By using `buffer_idx_mode = 3`, indexing will start at 1, instead of 11.
2019-12-27 13:00:50 +01: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
6ab14bf474
tabline: add consistent tab label to the end
closes #1882
closes #1883
2019-03-08 14:05:38 +01:00
Christian Brabandt
1471330825
Adjust buffer numbers for buf_idx_mode v2 slightly
fixes #1823
2019-02-08 07:55:35 +01:00
Christian Brabandt
cd1d8c2a96
Introduce buffer_idx_mode v2
fixes #1823
2019-02-07 08:11:47 +01:00
Christian Brabandt
624d2f1438
tabline: AirlineSelectTab still wrong sometimes
Partly revert commit 105e9daaf7
and fix #1857 another way, by making sure, that buffers are not taking
away from the s:current_visible_buffers list.

Fixes #1857
Fixes #1872
2019-02-06 22:42:10 +01:00
Christian Brabandt
767c1efd10
bufferline: catch invalid modelines 2019-02-05 08:35:57 +01:00
Christian Brabandt
999c40fcf3
tabline: simplify creation of maps
instead of typing all the mapping commands, create a loop that will
create the new maps.
2019-02-04 21:59:40 +01:00
Christian Brabandt
105e9daaf7
tabline: Make the PlugAirlineSelectTab buffers work as expected
for bufferlist.

fixes #1857
2019-02-04 21:47:11 +01:00
Christian Brabandt
58bbc512f9
tabline: Only define Terminal autocommand if vim supports it
fixes the broken CI test which runs in a vim that does not come with
terminal support
2019-02-03 10:43:23 +01:00
Christian Brabandt
1d03b9dc62
tabline: invalidate buffer list on Terminal Enter
should workaround and fix #1853 in a better way
2019-02-03 10:36:07 +01:00
Christian Brabandt
d68c9bbeb2
tabline: make middle-click work as expected in neovim
closes: #1854
2019-01-11 10:44:10 +01:00
Christian Brabandt
5aef1b90e5
tabline: Correctly trigger on BufDelete autocommand
fixes #399
2018-07-13 22:29:34 +02:00
Liam Fleming
feca81fb86 add "!" to function signatures 2018-06-13 17:52:13 +01:00
Christian Brabandt
a76f523be5
bufferline: always add a space for the very first item
closes #1631
2018-04-15 10:16:28 +02:00
mrmr1993
fbf96559c9 Fix buffer numbering to start from 1 with buffer_idx_mode
275ec4fe63 broke this so that numbering
started from 0 instead of 1 with
g:airline#extensions#tabline#buffer_idx_mode = 1

Specifically, I overlooked that |index| actually tracked the index of
the current buffer in the buffer list *starting from 1*, whereas I
assumed it tracked the true index (starting from 0).
2018-04-02 01:04:43 +01:00
mrmr1993
47c36d2819 Don't let the current buffer be -1 when calculating the tabline 2018-04-01 01:17:18 +01:00
mrmr1993
5b7b9cf656 Rename remaining tab -> title in tabline/builder 2018-03-19 15:03:51 +00:00
mrmr1993
0b47adf087 Rename tab -> title in tabline/builder method names 2018-03-19 14:36:02 +00:00
mrmr1993
d13305fc5d Redraw buffer tabline when the terminal width changes 2018-03-15 20:44:51 +00:00
mrmr1993
7844d8bf72 Remove get_visible_buffers 2018-03-15 20:44:51 +00:00
mrmr1993
275ec4fe63 Use tabline builder for buffers tabline 2018-03-15 20:44:51 +00:00
erfanio
8c634887bf Fix white space in tabline when showing buffers 2018-02-08 19:02:35 -08:00
Christian Brabandt
9a2ed35ff9
tabline: do not confuse Vim
looks like this:
```
let a=(condition ? s:var:'')
```
confuses older Vims and it complains about a missing colon. So make
parsing a bit easier and add a space in front of the second colon.

fixes #1629
2018-01-08 13:46:08 +01:00
Christian Brabandt
02816a3cb6
tabline: missing spaces
commit ab49a1c7ae changed that no leading whitespace was added.
While this removed a double space in front of the current active
selected buffer, it removed one space too much for the non-current
buffers in the bufferline.

So partly reverse it and only add the space, if the highlighting groups
between each item did not change.
2018-01-08 09:48:36 +01:00
Christian Brabandt
182675dc10
tabline: revert default buffer_idx_mode
commit 2e3cdeb unintentionally changed the default for the
buffer_idx_mode in the tabline.

Revert it back to be disabled by default

fixes #1628
2018-01-07 09:51:08 +01:00
Christian Brabandt
ab49a1c7ae
tabline: do not add extra space before buffer name
there was a space too much added in the tabline. Fix that
2018-01-05 22:13:47 +01:00
Christian Brabandt
5db4c408bd
Update copyright notifications 2018-01-05 10:37:59 +01:00
Christian Brabandt
c17ad9a123
Merge pull request #1426 from lynnard/master
Fix problems with AirlineSelect{Prev,Next}Tab
2018-01-04 21:15:00 +01:00
Christian Brabandt
c518f79aab
tabline: allow to show buffers label at start 2018-01-04 19:38:07 +01:00
Christian Brabandt
9d28f0dcc7
tabline: allow to show current buffer/tab at first position
This will make highlighting more consistent. Always first item is the
one where the cursor is.
2018-01-04 19:32:29 +01:00
Christian Brabandt
3b631ef0c4
tabline: refactor label function 2018-01-04 18:43:03 +01:00
Christian Brabandt
3985ece131
tabline: add [buffers]/[tabs] labels consistently
previously, when both tabs and buffers were displayed in the tabline, it
was not immediately obvious which side belongs to a buffer and which one
to a tab. Therefore, add [buffers]/[tabs] labels consistently.
2018-01-04 18:34:48 +01:00
Christian Brabandt
d78f686ce5
tabline: remove some more s:vars 2018-01-04 14:35:10 +01:00
Christian Brabandt
6ba65b2c8c
tabline: remove s:show_tab_type variable 2018-01-04 14:30:16 +01:00
Christian Brabandt
708c76e22c
tabline: do not cache s:buffer_idx_mode 2018-01-04 14:23:50 +01:00
Christian Brabandt
d03c3fa7b9
tabline: remove l: variable prefix 2018-01-04 14:20:36 +01:00
Christian Brabandt
2e3cdeb808
tabline: try/catch mapping of the keys
fixes #1621
2018-01-04 14:11:11 +01:00
icymind
b6a98bcd10 add option 'keymap_ignored_filetypes' for tabline extensions 2017-08-24 23:22:16 +08:00
Lingnan Dai
7f19896dc6 Fix problems with AirlineSelect{Prev,Next}Tab
Use the entire list of buffers instead of the currently visible ones
2017-02-28 15:56:37 +00:00
Christian Brabandt
706cee277a Add tab indicator for tabline when buffers are shown
closes #1329
2016-12-16 23:42:58 +01:00
Sam Fuller
7cb5c24151 prevent windows from closing on middle_click
Adding an option to prevent windows from being closed when a buffer in
the tabline is middle clicked and the clicked buffer is currently open
in a window.

When this option is enabled, instead of closing the window a new buffer
will be opened in all of the windows editing the clicked buffer instead.

This is my first pull request AND my first experience with vimscript, so
my apologies if this is a bit sloppy 😄
2016-12-09 13:20:48 +01:00
mhartington
ee8173e41d
feat(): allow for buffer index formatting 2016-11-25 12:36:55 -05:00
Daniel Hahler
5652b576b0 Add bang to function definitions
This makes it easier to reload the files, e.g. via vim-scriptease's
`:Runtime`.
2016-04-20 21:10:28 +02:00
Duncan Williams
0c251e20a7 Add middle click to close buffer functionality
Extended the left click to switch buffer functionality to also
support middle click to delete buffer

documentation of clickable buffers
2016-04-19 20:49:01 +01:00
Christian Brabandt
d8d08ada7b Make clickable buffers (only Neovim)
fixes #369
2016-03-02 18:47:09 +01:00
Yegor Pomortsev
7453b5e15c Fix buffer modified highlighting being set from wrong buffer
Fixes #1055, cased by refactoring in e4ef624 (#952)
2016-02-24 16:45:17 -08:00