This fixes issue when using Plug to conditionally loading NrrRgn:
Plug 'chrisbra/NrrwRgn', {'on': ['NR', 'NW', 'NRV', 'NW', 'NarrowRegion']}
The command will exist but the plugin has not been loaded yet which gives a warning message.
If there is a single terminal window in the current tabpage, the whole
long command will be displayed in the tabline, even when it should be
shortened by default.
By default the title will not be shown if there are several windows in
the current tabpage, but if there is only one single terminal window, it
will still be shown (and might be a bit long). But I guess, it is better
to just show a possible too long terminal window name, than not show
anything).
fixes#2126
Fixes issue #2142.
These changes primarily focused on making the include guards more robust
and simplify how the path for w:airline_section_c was generated.
Credits goes to @kazukazuinaina for improving on my original
implementation.
Matched VCS format of Netrw to only show branch name.
Filetype hidden as it is a duplicate on the left side.
File encoding hidden as it does not matter in dirvish buffer.
Removed unnecessary current column information
As requested by the coc maintainer, this is explicitly disabled, unless
the user configures vim-airline to use it for the branch extension. This
is done, because the `CocAction('extensionStats')` function is known to
be slow and this may cause a slow startup.
if g:loaded_youcompleteme does not exists, the ycm extension will not be
loaded. However extensions.vim could still try to init the ycm
extension, which would lead to an error message:
E117: unknown function airline#extensions#ycm#init
so make sure, it is only loaded, if ycm is loaded as well.
Put a word-boundary regex atom before and after the current filetype, to
make sure that a `C` filetype won't be detected as a filetype that
enables the wordcount extension. (`c` matches asciidoc).
Because changes plugin does not rely on git
Also remove the test of the local variable for the changes plugin
whether it is enabled or not, this is taken care of in the changes
plugin
The coc-git extension to coc does show similar statistics as e.g.
gitgutter, therefore, integrate the coc-git interface into the hunk
extension.
closes#2094
[Pandoc flavoured Markdown](https://en.wikipedia.org/wiki/Markdown#CommonMark) has its [own file type in `vim`](https://github.com/vim-pandoc/vim-pandoc-syntax#standalone), namely `markdown.pandoc`.
Word count by default in `vim-airline` obviously would make a lot of sense for this popular file type.
Fix this, by making sure that the wordcount extensions will apply
correctly if any of the combined filetypes (e.g. either pandoc or
markdwon) matches the list of allowed filetypes.
Fix#2062: restore g:airline_focuslost_inactive behaviour.
Only ignore focusgained events on Windows. If there are more problematic
platforms, we'll add them later.
Instead of ignoring the next x FocusGained events whenever we do call
system(), ignore them for the current second. That allows us to put a
hard limit on the duration of the ignore.
This seems like a much better solution than the previous one because it
also prevents ignore events from building up (s:focusgained_ignored was
often greater than 5).
Test (gvim 8.2.140 on Win10)
gvim.exe ~/.vim/bundle/airline/autoload/airline/extensions/branch.vim
:Gedit HEAD
check several parents and no regression of looping behaviour from #2053.
:let g:airline_focuslost_inactive = 1
:split
alt-tab several times and statusline is correctly dimmed and restored
each time.
closes#2029
airline#util#focusgain(1) was called too soon -- it's called before vim
loses focus and not after it gains focus. Instead, we ignore the next
FocusGained event.
This is actually a work around for a broken installation. the dict p
should always contain the accents key (see `airline#themes#patch()`
function, that adds missing accents). So even if the theme does not
define the accents key, it should always exist.
However, an error while evaluating the statusline is extremely annoying,
so add some safeguards here and skip the following for loop.
related #2043
vim-airline by default already tries to load theme names, that have the
same name as the colorscheme. Therefore, it does not make sense, to add
mappings that result in the same theme name.
So drop the base16, wombat, zenburn and solarized keys
gina.vim needs the `<mods>` feature to work correctly. Therefore check
that Vim has at least patch 7.4.1898 included before using and accessing
the gina plugin.
fixes#1984
Previously it used a width of >= 80 to display the long word count
format. However I personally found that a bit too wide, while other
sections will be shortened too much which does not really look nice.
Therefore, adjust the limit a bit, using the short word count format for
windows up to 85 characters.
This fixes a bug that causes a mangled statusline. The bug occurs, when
the `displayed_head_limit` variable is set and causes the substring
expression to take a substring, which ends in the middle of a multi-byte
character.
This patch replaces the byte-based methods for measuring the
length of the branch name and creating a substring with methods that are
character-based and multi-byte aware.
It also has the nice side effect of making the length measuring more
accurate, by taking the actual display width of multi-byte characters
and the ambiwidth setting into account.
Since we need to take into account older Vim 7.4 (which might not have
the strcharpart() function), do introduce a compatibility wrapper in
airline#util that checks for the existence of the function before using
it. Older Vims will keep on using the byte-based index. I suppose Vim
7.4 before the strcharpart() function was available (patch 7.4.1730)
shouldn't be in use anymore.
closes#1948
Define the variable :let g:airline_filetype_overrides to allow for
specific customization how a specific filetype will be displayed.
For e.g. a German display, you can use: >
:let g:airline_filetype_overrides = {'help': ['Hilfe', ':%f']}
<
This defines how section a and b will look like for a window with that
specific filetype.
Closes#1888
When `g:skip_empty_sections` is set, `:AirlineRefresh` can be called
very often and cause slow down, because it forcefully re-creates the
highlighting groups. This is mostly not needed for the redraw to happen,
therefore, add the `<bang>` attribute to the command, making it skip to
re-create the highlighting groups and have all extensions that rely on a
forced update use the `!` form.
Should be much fast then.
fixes#1908
A buffer name wich special characters such as Command-T [Files] will
cause E94 when trying to call setbufvar() on it. That is because the
'[]' is special in buffer names. Therefore, fnameescape the buffer name.
This should prevent 'E94: No matching buffer for
/home/louis/git/minivimrc/Command-T [Files]' errors.
closes#1906
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\+')
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
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.
closesvim-airline/vim-airline-themes#170
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.
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.
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.
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`.
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#1857Fixes#1872