Commit Graph

2060 Commits

Author SHA1 Message Date
Christian Brabandt
ffd8c406ab
branch: Make the branch extension available with 80 char wide windows 2019-04-24 16:12:54 +02:00
Christian Brabandt
9f193de600
branch: Remove spurious dirty var 2019-04-24 15:51:43 +02:00
Christian Brabandt
28bebd35ea
fugitiveline: use correct fugitive functions 2019-04-24 15:48:16 +02:00
Christian Brabandt
3ac318bfd3
fugitive: replace old buffer().commit() function by new global function
as requested by the exception thrown:
fugitive: A third-party plugin or vimrc is calling
fugitive#buffer().commit() which has been removed. Replace it with
matchstr(FugitiveParse()[0], '^\x\+')
2019-04-24 15:29:51 +02:00
Christian Brabandt
9112675ad8
branch: display dirty state
If the repository is considered dirty, do display the
g:airline_symbols.dirty symbol right after the branch name.
2019-04-24 15:16:57 +02:00
Christian Brabandt
a8c96d7c07
async: Move function definition so it is valid for nvim 2019-04-24 13:27:25 +02:00
Christian Brabandt
941341d085
branch: simplify async logic a bit 2019-04-24 13:25:31 +02:00
Christian Brabandt
ead2cd63bb
term: only strip first letter from name, if it starts with '!' 2019-04-18 15:52:54 +02:00
Christian Brabandt
704e58e1b7
Fix failing test and make it aware of tablabel_right 2019-04-17 13:24:19 +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
d1d9548b8e
themes: correctly catch not-found in init function
plugin/airline.vim was calling airline#switch_theme() without actually
catching the 'not-found' exception.

Therefore, in case of errors, explicitly switch to a dark theme.

closes #1903
2019-04-17 08:27:30 +02:00
Christian Brabandt
773f0e3637
Merge pull request #1898 from clobrano/short-path-formatter
Add formatter for short paths
2019-04-15 10:07:19 +02:00
Carlo Lobrano
0f1aec97da Add documentation for short_path formatter 2019-04-14 10:03:24 +02:00
Carlo Lobrano
ebb8f0c2b1 Add formatter for short paths
Add new formatter that shows the file path up to the first parent directory
2019-04-10 22:17:43 +02:00
Christian Brabandt
cbf264ff5f
Merge pull request #1897 from shayneholmes/wordcount-formatters
Search for wordcount formatters with extension
2019-04-09 20:56:34 +02:00
Shayne Holmes
979e04a6ec Search for wordcount formatters with extension
Autoload expects the autoload scripts to have the '.vim' extension.

Fixes #1986.
2019-04-09 11:52:40 -07:00
Christian Brabandt
86e73cade7
Get a random number from win32 cmd.exe 2019-03-26 21:53:47 +01:00
Christian Brabandt
4265798d4b
style: rename inconsistent function names 2019-03-26 21:10:45 +01:00
Christian Brabandt
148eb6bb28
Allow to switch to a random theme
You can now specify the special theme name `random` and vim-airline will
load a random theme from the ones installed. This works from either your
.vimrc as well as when calling `:AirlineTheme` command directly.

closes vim-airline/vim-airline-themes#170
2019-03-26 21:03:13 +01:00
Christian Brabandt
a6fb6d9da0
Extensions: indicate, if an extension is external
Show in :AirlineExtensions if the extension comes bundled with airline
or from an external source.

closes #1890
2019-03-26 08:41:36 +01:00
Christian Brabandt
1fb184305b
fugitiveline: simplify modify logic
The 'autochdir' option could be toggled on later in a session.
So do not set the has_autochdir flag once the file is read, but evaluate
it every time the corresponding function is called.

While at it, get rid of the s:fmod variable. Instead let a helper
function return the correct modifier flags depending on the value of the
'autochdir' option.
2019-03-25 12:34:09 +01:00
Christian Brabandt
c8a36e14e9
Updated Copyright Statements 2019-03-25 12:29:47 +01:00
Christian Brabandt
45205aa4a3
wordcount: expose filetype list to global scope
allows better configuration of filetypes to be wordcounted.

fixes #1887
2019-03-19 08:28:51 +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
1c3ae6077a
Merge pull request #1879 from gmolau/Fix-syntastic-formatting
Fix the formatting of syntastic error messages
2019-02-22 07:49:52 +01:00
Christian Brabandt
eb0ddf61dc
Merge pull request #1877 from maxnordlund/resepct-minwidth-for-vcs
Respect minwidth for hunks and branch parts
2019-02-22 07:49:28 +01:00
Georg Molau
395fccfda7 Fix the formatting of syntastic error messages
The magic flags were in the wrong order, %e is the number of errors, it
should go in the parentheses after the # symbol. %fe is the line number
of the first error. Same for the warnings.
2019-02-22 00:53:41 +01:00
Max Nordlund gmail
b69aa396c1
Remove trailing whitespace 2019-02-21 11:59:04 +01:00
Max Nordlund gmail
61ca196d73
Move formatting of branch name into get_head
This allows for advanced customization where the shortening of the
branch name is up to the caller, unlike before.

This change is observable from the outside, and as such can be
dangerous. But AFAIK it does not change the default behavior.
2019-02-21 11:59:04 +01:00
Max Nordlund gmail
5f769dbed9
Expose get_hunks for advanced customization 2019-02-21 11:59:04 +01:00
Max Nordlund gmail
45ff435378
Honor minwidth for hunks and branch parts
This removes the hardcoded minwidth limits for both the `hunks` and
`branch` parts. It replaces these with safe accesses to the `minwidth`
setting as done by `airline#parts#define_minwidth`.
2019-02-20 12:36:40 +01:00
Christian Brabandt
448aa43ec4
Merge pull request #1875 from petobens/master
Fix denite extension
2019-02-12 11:15:14 +01:00
petobens
cc7b3c1636 Fix denite extension 2019-02-11 09:22:43 -03: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
05572482b8
tabline: add forgotten changes from commit cd1d8c2a96
I accidentally missed including some more changes for buffer_idx_mode=2.
So add those files now.
2019-02-07 08:17:33 +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
4078688305
README.md: move section header 2019-02-04 10:38:11 +01:00
Christian Brabandt
96d42317b1
Update README.md 2019-02-04 10:37:34 +01:00
Christian Brabandt
23a8a7e04d
doc: ammend doc about statusline on top 2019-02-04 09:55:48 +01:00
Christian Brabandt
25e384f236
wordcount: move User autocommand to plugin
Do not scatter the autocommands around, but rather move the auto command
to the main plugin file. The function that handles the auto command will
be created in the autoload script.

Also add a call to force updating the tabline, if g:airline_statusline_ontop
is defined.

In addition, the wordcount() extension did not correctly notice
block-wise visual mode, so while creating the airline#mode_changed()
function, make the mode also detect blockwise visual mode correctly.
2019-02-04 08:25:45 +01:00
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