Commit Graph

1716 Commits

Author SHA1 Message Date
Christian Brabandt 8867301f78 plugin: Move tabline_update function to autoload 2019-02-04 08:23:58 +01:00
Christian Brabandt 840bf02baf autoload: Fix typo in comment 2019-02-04 08:21:39 +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 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 916d023c35 buflist: do not consider empty buffers to be excluded
currently, empty buffer names were still considered to match against the
exclude_path setting. That does not make sense, so skip the check for
empty bufnames.
2019-02-02 22:43:27 +01:00
Christian Brabandt 5415c5e6ec tabline: Fix broken call to formatter 2019-02-02 21:57:15 +01:00
Christian Brabandt 54584a2bb2 fugitive: mark fugitive like buffers with "[git]"
closes #1852
2019-02-02 18:04:53 +01:00
Christian Brabandt dc7d991007 Tabline: Make specifying formatter more easy
closes #1863
2019-02-02 17:45:55 +01:00
Christian Brabandt d372b5bc46 tabnr formmatter: fix style 2019-02-02 17:45:33 +01:00
Christian Brabandt 98bc6abde3 languageclient: check for existence of 'result' key
fixes #1861
2019-01-28 11:21:32 +01:00
w0rp 54dba2a92b Remove incorrect copyright attribution
I have never touched anything in this file, nor in the LanguageClient plugin, so the copyright attribution is incorrect. @neersighted may also wish to be removed from the list here.
2019-01-28 10:11:43 +00:00
Christian Brabandt a829ec4861 Merge pull request #1864 from petpetpetpet/more_efficient_ale_line_numbers
More efficient ale line number function.
2019-01-28 10:57:13 +01:00
petpetpet 57c061dcb0 Added a hook to the new ALE api to grab line numbers. Should be more
efficient.
2019-01-27 13:57:18 +00:00
Ming, Bai 6601474bf5 Fixed t:undotree undefined error
the ```t:undotree.GetStatusLine()``` is appended to the status line when ```t:undotree``` exists, but it seems like the ```statusline``` will be executed when ```t:undtree``` is no longer available during window destruction.
2019-01-22 14:52:39 -08:00
Konstantinos Natsakis 53aa65a5ce Fix ctrlp memory leak 2019-01-17 15:34:19 +02:00
petobens fa5910eb14 extensions: Add defx support
closes #1850
2019-01-11 10:49:31 +01:00
Christian Brabandt d68c9bbeb2 tabline: make middle-click work as expected in neovim
closes: #1854
2019-01-11 10:44:10 +01:00
Arjan van der Velde 2d3bbbff43 make VimLeave autocmd nested
add "nested" to autocmd to make it play well w/ YouCompleteMe

see https://github.com/valloric/youcompleteme/blob/109a0192795a9b7ea87e382cdbeeabcff091473c/README.md#ycm-does-not-shut-down-when-i-quit-vim
2019-01-10 23:15:30 -05: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 c0f96df97f Update metadata (copyright)
also remove trailing empty lines in test files
2018-12-15 19:56:30 +01:00
Christian Brabandt e3cfd3643b wordcount: prevent use of unused variable 2018-12-10 09:11:10 +01:00
Christian Brabandt 3d9071e6b6 themes: Load dark theme, when default colorscheme is loaded 2018-12-03 18:29:26 +01:00
Christian Brabandt c047abfe96 Add inactive statusline for terminal 2018-11-20 16:32:55 +01:00
Christian Brabandt bc63a60b0f terminal: return proper terminal name 2018-11-20 16:11:34 +01:00
Christian Brabandt 31f5a9307d Make terminal statusline work for inactive window 2018-11-20 15:48:28 +01:00
Christian Brabandt df0c1731db Add :AirlineExtensions command
This shows whether or not an extensions has been loaded.
2018-11-14 08:06:39 +01:00
Christian Brabandt f6a95d3a6f Fix wrong extension name for unicode 2018-11-14 07:41:48 +01:00
Christian Brabandt ffac12cbbe theme: do not show not-found warning
Only show the "airline theme not found" warning message, when the user
actually used `:AirlineTheme foobar`, not when called by an autocommand
that tries to switch themes when the Vim colorscheme changed.

fixes #1824
2018-11-14 07:36:45 +01:00
Christian Brabandt b2e1dbad6f use tr() instead of substitute
should be a bit faster
2018-11-13 22:54:49 +01:00
Christian Brabandt b3a574b4a3 Fix error in airline#add_statusline_funcref 2018-11-13 22:53:13 +01:00
Christian Brabandt 7f6dfbefd1 theme: only define g:autoload_theme if loading was successfully
fixes the test
2018-11-13 22:39:36 +01:00
Christian Brabandt 5b1c92979c Fix error in airline#add_statusline_funcref 2018-11-13 22:36:43 +01:00
Christian Brabandt 9dc546c699 use tr() instead of substitute
should be a bit faster
2018-11-13 22:29:32 +01:00
Christian Brabandt 14691bb00e themes: load them explicitly rather than implictly
While this adds a bit more code it makes it possible to distinguish
between themes not found and errors in themes.

Use :verbose AirlineTheme <foobar>
to also see the error message in case of errors.
2018-11-13 22:27:02 +01:00
Christian Brabandt b20e181bc8 Add a separate function for returning all available themes 2018-11-13 22:14:51 +01:00
Christian Brabandt c3ee263d5b whitespace: use airline#util#warning instead of echo consistently 2018-11-13 21:37:52 +01:00
Christian Brabandt 2eaf57ece8 xtabline: use airline#util#warning instead of echo conistently 2018-11-13 21:37:52 +01:00
Christian Brabandt c850f485ad autoload: use airline#util#warning instead of echo 2018-11-13 21:37:48 +01:00
Christian Brabandt 464633baad themes: Do not try to load the palette twice
This will be done explicitly by the switch_theme() function
2018-11-13 21:17:48 +01:00
Christian Brabandt d441b3f7b6 util: use correct endfunction style 2018-11-13 21:11:04 +01:00
Christian Brabandt f05f649be8 highlighter: even further refinement of when to skip groups 2018-11-13 13:57:15 +01:00
Christian Brabandt cfd373a5a2 highlighter: Better check, when to skip groups
Groupnames like 'airline_c1_to_airline_x_inactive' still have to be
processed, so do not skip them.

Also for the tabline, '_inactive' groups are not used, so skip them
2018-11-13 13:48:26 +01:00
Christian Brabandt 78e67897a4 highlight: fix previous commit differently
Actually we can restrict the loop condition to only run 5 times instead
of 6 (which was an oversight).
2018-11-13 09:06:39 +01:00
Christian Brabandt e66d65ebf4 highlighter: break out of loop at the end
thanks for mentioning @jottkaerr at
https://github.com/vim-airline/vim-airline/commit/4d8a06a5a911bc5aac35504b0971365d528dae29#commitcomment-31275754
2018-11-13 08:50:10 +01:00
Christian Brabandt 4d8a06a5a9 highlighter: get rid of s:Get() function
Replace by a function that retuns the to be executed highlighting string

Should in theory be a bit faster, since the same function does not have
to be called 5 times per highlighting group.

It probably is not much better, but here are some random numbers:

Profiling:

Previously:
count  total (s)   self (s)
  199   0.022973   0.009909     let cmd = printf('hi %s %s %s %s %s %s %s %s', a:group, s:Get(colors, 0, 'guifg=')…

New:
count  total (s)   self (s)
   79   0.010166   0.000862     let cmd = printf('hi %s%s', a:group, s:GetHiCmd(colors))
2018-11-12 17:59:02 +01:00
Christian Brabandt 6c6c6c104f highlighter: exec_separator will re-create '_to_' groups
so we don't need to re-create them in the main for loop of
airline#highlighter#highlight() and so skip those groups.
2018-11-12 05:18:53 +01:00
Christian Brabandt f3d6a3542a Revert "highlighter: also check separator groups for being defined"
This reverts commit 99971aa24d.
2018-11-11 21:18:13 +01:00
Christian Brabandt 8c36d2b595 allow to use alternative seperators for inactive windows
closes #1236
2018-11-08 17:09:17 +01:00