as per https://github.com/tpope/vim-fugitive/issues/2034
This also fixes an issue that is shown in older Vims (pre 7.4.1711)
since those versions did not correctly catch exceptions while evaluating
the statusline.
closes#2566
fern.vim decided to remove the global variable `g:fern_loaded` in
f9404e8a59b6a74b15a5
So adjust to use the correct variable name `g:loaded_fern`.
fixes#2346
Back when the colnr symbol was first introduced in
8929bc72a1 it included symbol `\ue0a3`
when powerline fonts where supposed to be used by setting
`:let g:airline_powerline_fonts=1`
However, it turns out, that those symbol, may actually not be defined in
the powerline fonts at all, only in the
[powerline-extra-symbols](https://github.com/ryanoasis/powerline-extra-symbols)
and this has caused various issues, because it either did not display at
all, or the symbol caused strange overflowing issues which made the
overall look of the status line not very appealing and already caused
various issues here in the vim-airline repository.
Therefore, fall back to the symbol `\u2105` (℅) which at least is
already defined in the Unicode specification and has therefore a higher
chance of being defined inside a powerline font at all (but it may still
be missing after all).
Also, it is more consistent, because it will now use the same symbol as
when `g:airline_powerline_fonts` is not defined and the default Unicode
symbols are selected.
So if you want to keep on using the old symbol, you need to use:
```
let g:airline_symbols.colnr="\ue0a3:"
```
fixes: #2563
related: #2381
927e142e94 broke the "show the lang flag"
functionality, as the check `if g:airline_detect_spelllang` is always
false when this variable is `'flag'`. Explicitly check whether this
variable is the string `'0'` to detect whether the feature should be
disabled.
Not marking the end makes the rest of line (after the close button) also clickable and react as if the close button was clicked. That is very confusing and incorrect behavior.
The last PR (#2522) caused some issues for me, and the author @KSR-Yasuda suggested that this change could be the culprit. `__CtrlSF__` and `[No Name]` tabs appearing, and adding them to `airline#extensions#tabline#ignore_bufadd_pat` just made the whole tabline disappear.
I also use the Startify plugin with session saving, and found that when restoring a session, the tabs would no longer appear until I had visited a buffer again, whereas beforehand they would load up a soon as I opened Vim. So I commented out my entire vimrc, and could reproduce this issue by opening an existing session with `vim -S mysession`. Without this fix, only a single buffer from the session is shown in the tabline.
I'm using regular Vim, version 8.2 on MacOS 12.3.1.
- Manage `nobuflisted` windows together
- If a tab has no `buflisted` window,
the tab label is named from default buffer name.
- Fix default buffer name selection from wrong tab
- It has picked up default buffer name from active tab,
not from the target tab.
With Neovims recent merge of a global statusline (e.g. a statusline that
is the same across all windows), make sure that truncation only happens,
by checking the complete terminal window width instead of using the Vim
window width (similar to when using g:airline_statusline_ontop).
related: #2517
The current way to parse the statusline content and decide whether a
section is empty, has some flaws:
That is for the following reasons:
- accents are considered to be empty (which they really shouldn't)
- manually parsing the expressions using a
`:while ... matchlist() ... endwhile` loop is slow and fragile
- grouping items such as %( %) are not considered
So replace the logic by using `substitute('pat', '\=add()', '')` to
capture all single expression groups into a list and then looping over
those to decide whether the section is empty.
fixes#2411
So with https://github.com/jmcantrell/vim-virtualenv you can display the
virtualenv in your statusline section (if you have enabled it). However
it would only become active for python buffers.
Now perhaps you want to show the virtualenv also in other filetypes like
markdown or CI scripts, so allow this by adding a variable
`airline#extensions#virtualenv#ft'` to the list of filetypes you want to
have enabled. So set:
let g:airline#extensions#virtualenv#enabled = 1
let g:airline#extensions#virtualenv#ft = ['python', 'markdown']
To allow displaying the virtual environment for python and markdown
buffers (but remember you need to have the plugin
https://github.com/jmcantrell/vim-virtualenv installed as well!)
fixes#2483
When openning popup (vim) or floating (neovim) windows,
do not consider those windows for disabled windows. That is, leave the
main window in activate state instead of marking it disabled
closes: #2387
When using Neovim and switching to another buffer with the mouse and the
current buffer is modified, Vim refuses to switch buffers rightfully,
if the user has not set 'hidden' or 'autowrite' (because it is going to
unload the buffer from memory).
So catch this case and let the user know.
Note: :b! would be another possibility, but I do not prefer using this
attribute, because it is not clear what happens to the current buffer. I
think it is made hidden, but I prefer to be explicit here
closes#2478
Because Tlist_Get_Filenames() only exists within yegappan/taglist,
TlistUpdate was being envoked on every call when using other taglist
versions.(Like vim-scripts/taglist.) This caused visual artifacts and
slowdowns.
We now check for a function from both taglist variants to see if either
one has been loaded.
Avoid the error `Unknown function: taglist#Tlist_Get_Tagname_By_Line`
when using the old tag tlist plugin in a different way.
this means, we have to revert 5841039679
since exists() does not handle autoloaded functions correctly.
We can only check it, after we have used the taglist plugin, so that the
autoloading has happened. That means, move the exists() call after the
`:TListUpdate` call which will correctly autoload taglist and then
exists() can check for the existence of the
`taglist#Tlist_Get_Tagname_By_Line()` function correctly.
closes: #2463
So 47bf6b1716 added support for
yegappan/taglist plugin, but unfortunately the old (deprecated)
vim-scripts/taglist.vim repo still exists and this one throws an error
when trying to access taglist#Tlist_Get_Tagname_By_Line
So check, that this function is defined before trying to load the
extension
While Commit e542f5e introduced a nice little feature for TeX files to
accurately count words, this unfortunately has the drawback of being
possibly slow, especially since the statusline is often re-evaluated.
Therefore disable this feature by default. You can enable it using:
:let g:airline#extensions#vimtex#wordcount = 1
fixes#2461
With help from Karl Lervag's suggestion on how to reliably tell when the
above mentioned conditions are the case for the current buffer
Checked to work with other filetypes that use the wordcount in
vim-airline, and these seem to work as before.
Also checked that if two of these filetypes (one TeX and the other
another type, such as markdown) the two coexist peacefully, with TeX
using Karl's wordcount function, and the other using the (I assume)
native wordcount?
Fixed comment wording
Hello.
This PR should solve my pain as CoC user, that CoC status takes too much space in the C section, right after the file path.
It looks like a waste of space on splitscreen or a small screen.
So I added an option to set
g:airline#extensions#coc#show_coc_status = 0
and the status will be hidden.
By default it works like usual.
Displays whether you have the ruby formatter enabled or not for the
session you are in.
Enable with:
let g:airline#extensions#rufo#enabled = 1
Configure with:
let g:airline#extensions#rufo#symbol = '💎'