Commit Graph

67 Commits

Author SHA1 Message Date
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
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
rosston
63f9abd3f2 Fix highlighting of current/modified buffer.
Fixes broken variable reference caused by e4ef624 (#952).
2016-02-22 23:07:27 -05:00
Kevin Sapper
e7edb4c75a Problem: Cannot rename the labels for buffers and tabs
Solution: Add an option for the user to configure those labels and make
the current values the default ones.
2016-02-22 08:30:20 +01:00
Bailey Ling
e6ab7bdf6d show tabs on the left when in tabs mode, splits on the right (#1043) 2016-02-21 15:03:55 -05:00
Bailey Ling
8c080fdf80 Merge pull request #952 from chrisbra/buffer_line
Always display buffer list in tabline
2016-02-20 20:10:12 -05:00
Shanti Bouchez-Mongardé
faa7a18242 Make tabline compatible with bufmru 2016-02-16 21:16:55 +01:00
Christian Brabandt
a2f54ef6e6 add feedback from PR 2016-02-15 20:01:34 +01: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
31906ac7b2 Some improvements for the buflist implementation
This should make the buflist algorithm faster.
Also there is an alternative implementation in branch 535 available,
which avoids looping over the complete range, I'll stay with the current
approach, as it does not depend on BufAdd/BufDelete autocommands.

details:
instead of testing for buflisted() and bufexists() we only test for
buflisted() because, this also tests for the existence of the buffer.
Also instead of a second loop of the exclude patterns, we'll join all
of them together with '\|' and check if they match the current buffer.
The rest of the conditions have been joined into a single condition.

This together made up an improvement of
Orig:
FUNCTION  airline#extensions#tabline#buflist#list()
Called 94 times
Total time:   0.267305
 Self time:   0.267305

New:
FUNCTION  airline#extensions#tabline#buflist#list()
Called 85 times
Total time:   0.124572
 Self time:   0.124572
2016-02-09 19:41:17 +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
3f927b587d Revert "remove wrong backslash"
This reverts commit da3f3bf1d7.
2016-02-04 19:03:25 +01:00
Christian Brabandt
da3f3bf1d7 remove wrong backslash 2016-02-04 16:25:27 +01:00
Christian Brabandt
5923ced2b0 clarify buffer_idx mode mappings
Also add mappings for tabmode as suggested.
2016-01-22 20:20:18 +01:00
Christian Brabandt
6c1fb7e275 use silent flag for AirlineSelectTab mappings 2016-01-20 20:07:45 +01:00
Christian Brabandt
db6bf458fb Check window size
Before setting showtabline option, make sure, there is enough room
fixes #863
2016-01-17 18:35:24 +01:00
Bailey Ling
048b24a916 happy 2016! 2016-01-14 21:38:38 -05:00
poppyschmo
a58b3cba55 Sweep tabline of unlisted buffers on each BufLeave 2015-09-25 14:11:07 -07:00
Bailey Ling
cdc6d98a09 Merge pull request #788 from toupeira/patch-1
Remove trailing slashes in unique_tail formatter
2015-07-08 22:28:28 -04:00
Enrico Ghirardi
317e5fa47a Tabline: add exclude_preview option to hide preview buffer 2015-06-28 22:34:37 +02:00
Markus Koller
312f847e73 Remove trailing slashes when getting path tail 2015-06-04 18:14:06 +03:00
Lawrence M
252978e4ac tabline: add fnametruncate option to truncate long tab/buffer names 2015-03-20 16:37:36 -07:00
Bailey Ling
96a94d8c3a add option to display both tab number and splits. resolves #440. 2015-03-01 09:56:36 -05:00
Lingnan Dai
661c5fb0c5 tabline -- added AirlineSelect{NextTab,PrevTab} commands with countable support 2015-03-01 00:18:02 +00:00
Bailey Ling
c78767a564 fix buffer mismatch in certain cases. resolves #715. 2015-02-26 23:08:59 -05:00
Bailey Ling
e2a120869b fix load error for buffer_idx_mode. resolves #711 2015-02-20 19:37:55 -05:00
Bailey Ling
618851188a hide tab type as per documented variable. resolves #667. 2015-02-19 21:33:05 -05:00
Bailey Ling
63e309130a account for possibility of uninitialized variable 2015-02-19 07:09:24 -05:00
Bailey Ling
7394642293 extract buffers view mode into its own file 2015-02-18 21:56:16 -05:00
Bailey Ling
987306dcaf extract tabs view mode to its own file 2015-02-18 21:56:15 -05:00
Bailey Ling
6f9d92df7c extract autoshow logic to its own file 2015-02-18 21:56:15 -05:00
Bailey Ling
8693a525b9 extract buffer listing to its own file 2015-02-18 21:56:15 -05:00