Cache the hunk values. In case of short windows, shorten the hunk string
a little bit and make the branch extension take the hunk value into
account when deciding how much to shorten it.
Sometimes, if a buffer triggers many whitespace check warnings,
and the Vim window size is too small, other parts of the statusline
might become unreadable.
Therefore, if the window size is smaller than say 120 characters
and the whitespace warning > 9 chars, limit it to 10 characters
and inidicate, that there is more to come
fixes#1187 by making sure, we only call functions, that actually exist.
Should make vim-airline work with lady loaded YCM, e.g. using vim-plug:
```viml
" Code to execute when the plugin is loaded on demand
Plug 'Valloric/YouCompleteMe', { 'for': 'cpp' }
autocmd! User YouCompleteMe if !has('vim_starting') | call youcompleteme#Enable() | endif
```
Make sure, b:airline_head variable is set, also it is initially set in
this function earlier. But see #1171 for an error.
Therefore, before checking if the variable is empty, make sure it
exists.
fixes#1171
This is a little bit a hack, because by the time the separators are
added, it is not clear, if the following section is empty, therefore
we need to parse the content of the following section and eval the
expressions to find out, if this is empty
Remarks:
- catch all exceptions when eval'ing statusline
- make sure, that the seperators are highlighted
even when skipping empty regions (highlight group
names need to be adjusted)
- if a section is defined as empty, it will be removed completly from
the statusline. This means, it won't be called on the next update
and may not refresh properly (e.g. when the whitespace check
triggers, therefore, the whitesapce extension has to call an
explicit redraw whenever it is supposed to be refreshed)
"system()" called by "get_git_untracked" and "get_hg_untracked" fails
sometimes. It reports error "Can't open file /tmp/***".
The root cause is that the file path for system() contains some unordinary
character and lacks quotes.
airline#extensions#load() tries to load all extensions,
the user has specified in g:airline_extensions.
However, if e.g. bufferline is requested to be loaded, but
is not installed, it will throw an error
E117: Unknown function: airline#extensions#bufferline#init
Therefore, catch E117 and show a warning.
closes#1127
Similar to #1065 and #1081, adds link scripts to be excluded.
Adds a list containing C-like languages to ignore, which implement
multiline comments as:
/*
*
...
*/
Comment below filetype check reflects all exclusions (c-like)
This patch prevents check_mix_indent_file() form notifying a "mix-ident-file"
when working where C/CPP using space and comment like:
/**
* Some comment on the 1st column that shall not trigger check_indent_file()
*/
This kind of file can be found in linux kernel for example.
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.
theme usually use '_' instead of '-', so replace that first before
trying to match.
Second, make the patterns easier to match.
Third, make sure, match for Tomorrow happens with matching case
fixes#1056
This is required when used with 'Normal' with a transparent background.
Falling back to 1 here results in "red" for "ctermbg"!
I think it's important to keep the 'NONE' color property here, instead
of hardcoding the fallbacks (even if white would be used instead of
red).
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
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
Try a different approach, that does not echo
the commandline. For that, create a <silent> mapping,
that is called via feedkeys() and as such should update the tabline.
fixes#1011