Commit Graph

99 Commits

Author SHA1 Message Date
mrmr1993
f60cf736db Add a get_tabs function to abstract over tabs 2018-03-12 21:47:08 +00:00
Christian Brabandt
167602d5b9
tabline: get correct buffer name
When the uniq_tail formatter is used, the buffer name is not refreshed
when running through the duplicates. Fix that by getting the correct
buffer name again.

fixes #1680
2018-03-06 11:23:38 +01: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
73d8abff2f
Merge pull request #1617 from kyleholzinger/master
Add formatter for js files
2018-01-04 21:14:00 +01:00
Christian Brabandt
d283a25e3f
tabline: only show buffer label, if they were drawn
closes #1558
2018-01-04 20:56:09 +01:00
Christian Brabandt
ce83c39bed
tabline: allow custom formatter for tabnr_type
closes #1418
2018-01-04 20:41:55 +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
30652c05c4
tabline: correct order of tab/buffer labels 2018-01-04 19:09:02 +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
503b9977fb
tabline: refactor s:variables 2018-01-04 18:20:25 +01:00
Christian Brabandt
69aa1e93b3
tabline: add more try/catch for mappings
similar to 2e3cdeb808 add a couple of more try catch statements
around the map_keys() function
2018-01-04 18:15:40 +01:00
Christian Brabandt
645f65d8d9
ctrlspace: wrong separator
under certains circumstances it could happen that for the vim-ctrlspace
tabline extension a tabline group was redefined which would cause a
separator having foreground and background color swapped. This was
caused by using the 'pos' parameter for the right side wrongly.

fixes #1559
2018-01-04 18:07:03 +01:00
Christian Brabandt
45236ba7c7
ctrlspace: refactor s:variables 2018-01-04 17:27:34 +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
Kyle Holzinger
a3d5e84417 Add formatter for js files 2017-12-28 15:43:13 -05:00
Shohei Fujii
b044b4b204 collapse fname in tabline when using unique_tail formatter 2017-10-30 20:00:05 +09:00
icymind
b6a98bcd10 add option 'keymap_ignored_filetypes' for tabline extensions 2017-08-24 23:22:16 +08:00
tenfy
c0695feb13 Fixes #1515. The tabline will no update when use ctrlspace together.
Do not update tabline when the new buffer is no add to BufferList yes.
It will update by other event later.
2017-08-08 15:07:54 +08:00
Christian Brabandt
62952b3887
tabline: only map keys if not done yet
Should improve performance by not steadily remapping keys
2017-06-27 14:44:03 +02: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
Shaun Brady
718107c107 Make ...#excludes|exclude_preview runtime configurable
airline#extensions#tabline#excludes and
airline#extensions#tabline#exclude_preview previously had no impact if
changed after vim load.  This fixes that.
2016-12-03 23:40:15 -05:00
Christian Brabandt
04be981de9 make ...#fnamemod configurable during runtime
airline#extensions#tabline#fnamemod would be initialized and could not
be changed during runtime, so fix that.

closes #1347
2016-12-02 13:40:34 +01:00
mhartington
ee8173e41d
feat(): allow for buffer index formatting 2016-11-25 12:36:55 -05:00
thawk
45d77ca909 Add 'scriptencoding utf-8' to all scripts 2016-09-24 08:16:30 +08:00
Christian Brabandt
a6c04644ef Map keys in ctrlspace mode
fixes #1181
2016-07-03 21:09:42 +02:00
Harm te Hennepe
74aacca55d update ctrlspace bufferline to use clickbuf() 2016-06-02 16:00:00 +02: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
Christian Brabandt
3f2247593a Merge pull request #1117 from 987poiuytrewq/middle_click_buffers
Make middle clickable buffers (only Neovim)
2016-04-19 23:33:11 +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
Shane Smith
a79e35b5e3 Fix tabs theming 2016-04-11 18:22:42 -04:00
Harm te Hennepe
bc7aa0c812 tablineat() support with ctrlspace tabline 2016-03-19 17:38:53 +01:00
Christian Brabandt
d8d08ada7b Make clickable buffers (only Neovim)
fixes #369
2016-03-02 18:47:09 +01:00
Christian Brabandt
a45a96c881 Merge pull request #1063 from sappo/master
Various ctrlspace tabline improvements
2016-03-01 20:40:20 +01:00
Kevin Sapper
ab948735be Problem: Cannot disable tabs for ctrlspace tabline
Solution: Implement the show_tabs option which is used by the default
tabline.
2016-02-25 11:35:52 +01:00
Kevin Sapper
2f2797becb Problem: Cannot disable displaying buffers for ctrlspace tabline
Solution: Implement the show_buffers option which is used by the default
airline tab as well.
2016-02-25 11:19:52 +01:00
Kevin Sapper
ad5194244b Problem: Cannot switch position of tabs and buffers for ctrlspace
tabline
Solution: Add a new option which inverses the position of buffer and
tabs

If switch_buffer_and_tabs is 0 (default) buffer are on the left and tabs
on the right else if is 1 the order is reversed.
2016-02-25 11:03:50 +01:00