Commit Graph

994 Commits

Author SHA1 Message Date
David Antaramian
42522f994a Fixes typo introduced in a10d321
Commmit a10d321809 introduced a small typo
spelling a previously set variable `trailing_fmt` as `trailing_fm`. This
causes Vim to report `trailing_fm` as an undefined variable. In this
change, the variable is properly referenced as `trailing_fmt`.
2017-06-30 18:45:21 -04:00
Christian Brabandt
a10d321809
whitespace: move s:variables around
Will make sure, that even after setting the whitespace extension
variables, they are taken correctly into account.
2017-06-30 21:37:37 +02:00
Christian Brabandt
a914cfb754
backout b2f301f73c
Backout commit b2f301f73c

First of all, it caused flicker (which is caused by a Vim bug:
https://groups.google.com/d/msg/vim_dev/fdgPqmYZwOk/KJzR4l9wAwAJA)

and then the cache was not reset when editing a new file.

So let's just revert that commit, although it does affect performance.

fixes #1499
2017-06-28 21:10:57 +02:00
Christian Brabandt
313a6fcad2
tabline: prevent flicker on Windows
calling settabvar() while evaluating the 'tabline' setting apparently
causes flicker on Windows. Fall back to using `:let t:var` to store the
content in the current tabpage.

This is not as good as using `settabvar()` since we cannot store the
title for other tabs, but at least it should prevent the flicker and at
the same time at least cache the title for the current tabpage.
2017-06-27 18:28:28 +02:00
Christian Brabandt
825aec9e4d
Revert "highlight: skip processing the same hi group twice"
This reverts commit feee9bcf3c.

It brakes CI and shouldn't be needed
2017-06-27 14:44:49 +02:00
Christian Brabandt
62952b3887
tabline: only map keys if not done yet
Should improve performance by not steadily remapping keys
2017-06-27 14:44:03 +02:00
Christian Brabandt
b2f301f73c
tabline: Cache title as tablocal variable 2017-06-27 14:40:31 +02:00
Christian Brabandt
174b7e1962
hunks: Make hunk extension slightly faster
do not call airline#extensions#branch#head() but instead use the cached
variable b:airline_head.

Note: it looks like GitGutterGetHunkSummary() could need some cacheing
2017-06-27 14:16:28 +02:00
Christian Brabandt
6ab0098ced
Ale: Cache Warning and Errors
should provide some better performance
2017-06-27 13:52:48 +02:00
Christian Brabandt
feee9bcf3c
highlight: skip processing the same hi group twice
Shouldn't happen, but just in case skip creating highlighting group,
if the same group with the same attributes has already been defined.
2017-06-26 23:17:43 +02:00
Christian Brabandt
583ae3d5f9
highlighter: skip create hi groups for inactive mode if not needed
This will skip creation of highlighting groups, if there are no inactive
windows.
2017-06-26 22:30:48 +02:00
Christian Brabandt
560092a9ec
highligher: fix the comparison before redefining hi group
The comparison in airline#highlighter#exec() was there to prevent to
call out to too many :hi calls by making sure that the newly to be
defined highlighting group will be actually different from the current
existing one.

However, that did not work, as the returned old highlight
group did never match the newly to be created one, since it
intentionally left the cterm attributes out for the gui and the gui
attributes for the terminal.

Therefore, fix the comparasion and make it compare the actual values
that we have.

This should make vim-airline a bit faster (hopefully!)
2017-06-26 22:27:01 +02:00
Christian Brabandt
f86f1e8103
whitespace: Only refresh on changes to buffer
Should prevent too many redraws of Vim
2017-06-26 10:04:43 +02:00
w0rp
c8a5efc11e Update the ALE extension so it loads better and uses the new count format 2017-06-25 19:49:18 +01:00
Christian Brabandt
0a352c9f5b
branch: don't check untracked status for files in vcs dir
Currently, vim-airline will check untracked status for files e.g. living
in .git. So when editing .git/config it will show as being untracked.

While technically, this is correct I prefer not to see this for those
files. So skip the check for those files.
2017-06-24 14:03:40 +02:00
Christian Brabandt
fde2511201
Syntastic: remove unused variable 2017-06-22 09:47:01 +02:00
Christian Brabandt
57e564b227
Add termguicolor check for is_win32term
closes #1259
2017-06-21 15:44:58 +02:00
Christian Brabandt
87cdf8f6c4
highlighter: Make sure hi group exists and is valid
previously we only checked, that the group exists, however
if loading a new color scheme, this might lead to the group becoming
cleared. That means it still exists, but the highlighting group would
not show anything. Therefore, also check that the group is not cleared.

closes #1483
2017-06-21 09:19:51 +02:00
Christian Brabandt
52c0afadb9 Merge pull request #1413 from chrisbra/wordformat
Improvements to wordcount formatting
2017-06-20 23:31:15 +02:00
Christian Brabandt
2e3055541e
syntastic: distinguis errors and warnings
Currently the syntastic results are simply dumped into the error
section, however syntastic does internally distinguish between error and
warning sections.

Therefore change the syntastic extension to dump errors into the error
section and warnings into the warning section.

closes #1480
2017-06-20 22:26:22 +02:00
Christian Brabandt
d2b697d27b
ale ext: fix syntax error 2017-06-20 22:23:46 +02:00
Christian Brabandt
7f3d6287b5
ale ext: simplify logic 2017-06-20 21:20:24 +02:00
Christian Brabandt
1891933e59
branch: better display of branch for both hg and git
If a file is edited inside a git repository, which lies within a git
repository, the branch extensions shows 'gitmaster | hgdefault'

To make it more obvious, that we are looking into both repositories
here, use 'git:master | hg:default'

closes #1482
2017-06-20 17:47:07 +02:00
Christian Brabandt
c436592559
bufferline: take 'acd' into account
vim-airline does use a different section (path/file) depending on
whether 'acd' is set. Later in the bufferline extesion however, it
unconditionally overwrites the 'file' section, regardless of whether
this section is actually used.

Therefore the bufferline section needs to check this option as well.

fixes #1487
2017-06-20 13:58:39 +02:00
Christian Brabandt
e16ff7cc88
Do not error out, if a netrw variable is not defined
This should not happen, however being a bit more error tolerant
shouldn't hurt, so let's just fall back to 'normal' for the
g:netrw_sort_direction in case it is not defined (which should be the
default anyhow).

fixes #1492
2017-06-19 15:56:17 +02:00
Oz Elentok
7865dc8149 Improve denite extension performance 2017-06-12 22:00:25 +03:00
Maxim Gonchar
8e64138ef4 Add vimtex support
Indicates:
- whether the file is considered to be main or local
- whether the viewer is opened
- whether the compilation is running
- whether the compilation is continuous

Added:

* `vimtex` existence check
* variables documentation

TODO: readme and a screenshot

Update readme.md

Update doc

Update screenshot url
2017-05-08 13:07:13 +03:00
Christian Brabandt
d593359500
shorten filetype only when winwidth is < 90 2017-05-02 22:06:36 +02:00
Christian Brabandt
a950a2938a
shorten tagbar extension on short windows 2017-05-02 21:22:47 +02:00
Christian Brabandt
4a47cd70cd
correctly check w:airline_skip_empty_sections var 2017-04-11 22:10:43 +02:00
Christian Brabandt
f76ede3b28
Make skip_empty variable overridable per window
The denite extension functions return the content of some buffer-local
variables. Those variables are not defined, the first time the they are
accessed and therefore, the statusline is not updated later when
g:airline_skip_empty_sections is set.

So disable this variable in this window, by setting the
w:airline_skip_empty_section=0 variable in the denite window.

closes #1454
2017-04-10 09:29:27 +02:00
Shivansh Rai
223624d3e9
Update icon spacings
The line numbers start to merge with icons when they get large
Reference: https://image.ibb.co/e7KGaa/airline.jpg
2017-03-17 19:08:47 +05:30
Christian Brabandt
46b0b6bf5a Merge pull request #1427 from thatsmydoing/denite
Add support for denite
2017-03-15 10:06:19 +01:00
Thomas Dy
c9a0c62b1b Add support for denite 2017-03-15 16:41:50 +08:00
Christian Brabandt
17d2db93fd
Check, that fg color can't be negative 2017-03-13 18:50:19 +01:00
Christian Brabandt
ba7d8c59f7
Call hg qtop with locale set to C
closes #1438
2017-03-13 09:49:02 +01:00
Chris White
fb6231b479 Permit appending content to a theme
When ctrlp is not loaded, do not finish (terminate script execution).
Instead, just skip assigning the ctrlp colors.
2017-03-12 18:16:26 -04:00
Christian Brabandt
134c0204f3
Do not return a negative background color
fixes #1429 and similar
2017-03-05 22:18:04 +01:00
Christian Brabandt
fbd791e7f0 Merge pull request #1424 from tweekmonster/powerline
Fix g:airline_powerline_fonts check
2017-02-28 08:51:08 +01:00
Christian Brabandt
52663545a9
Only reset to Normal highlighting if it is actually defined
closes #1415 and similar
2017-02-28 08:33:44 +01:00
Tommy Allen
9876a0a2de Fix g:airline_powerline_fonts check 2017-02-27 22:32:06 -05:00
Alexey Zhikhartsev
3c6135d75f
Add a function to disable whitespace-detection
Useful to call for particular file types (e.g., .tex files):
ftplugin/tex.vim:
    call airline#extensions#whitespace#disable()
2017-02-26 10:35:17 +01:00
Christian Brabandt
9d89375b8f
Do not update wordcount on unknown buffers 2017-02-26 10:25:21 +01:00
Christian Brabandt
727a2b48d9
Rename wordcount update function 2017-02-26 10:24:08 +01:00
Christian Brabandt
7e6986651c
Fix stupid typo 2017-02-25 22:13:16 +01:00
Christian Brabandt
f8c85e3e53
for airline ascii symbols set g:airline_symbols_ascii 2017-02-25 17:39:32 +01:00
Jorrit Visser
078537f1e2
Add interface fallback (Powerline>Unicode>ASCII)
Basically what the title says. First check if the user has Powerline,
fall back to Unicode symbols if he doesn't and fall back to ASCII
symbols if he doesn't have that either.
2017-02-24 22:23:41 +01:00
Jorrit Visser
72478dee02
Make vim-airline pretty without Powerline
Vim-airline is not a looker without a Powerline font. This fixes that!

* Ugly separator symbols are hidden
* New branch (ᚠ), line (㏑), maxline (☰) and whitespace (☲) symbols
* Replace old whitespace (✹) symbol in Powerline with the new (☲) more logical one
2017-02-24 22:23:41 +01:00
Christian Brabandt
db01efd508
Better reformat wordcount format in with separator 2017-02-24 18:28:48 +01:00
Christian Brabandt
b2bbe7dbc2
Small wordcount format output on windows < 80 2017-02-24 18:25:29 +01:00