Commit Graph

170 Commits

Author SHA1 Message Date
Christian Brabandt e5f9ccad8e
terminal: use mode() to detect terminal mode
workaround with index(term_list(), bufnr('')) > -1 not needed anymore,
since vim 8.0.936 will correctly return 't' for the mode() function in
the terminal.
2017-08-20 22:47:00 +02:00
Ryan Lue 039fd6b50f Fix airline#switch_matching_theme() to accommodate camelcased colorscheme names 2017-08-07 12:42:22 +08:00
Christian Brabandt 0c307d5f73
Better way to check for terminal buffer 2017-07-30 18:57:05 +02:00
Christian Brabandt d54613d2dd
Check for existence of term_list()
fixes #1518
2017-07-30 18:55:52 +02:00
Christian Brabandt 846d85aaa1
main: support for Vims terminal mode
Currently this is a hack, to get terminal mode from Vim.

However there is no better solution yet, since the API is not stable
here. Until then, just use the hack with
index(term_list(), bufnr('')) > -1
2017-07-30 09:51:23 +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 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 7d082c03b2
Do not clear intro screen
if airline is initialized too early and some :hi commands are run,
this will force a redraw in Vim which will result in the intro screen
being cleared.

Currently, this does not work for gvim, not sure why.

closes #1476 (well only partly, until i have discovered, why for gvim it
doesn't work).
2017-06-21 13:21:13 +02:00
Christian Brabandt 7cd7972bbe cleanup unlet calls
Instead of looping through the list and unletting each value separately,
join the list and their names together and unlet them all together.
2016-12-13 20:28:30 +01:00
thawk 45d77ca909 Add 'scriptencoding utf-8' to all scripts 2016-09-24 08:16:30 +08:00
Christian Brabandt 73aea86a7a Do not unconditionally modify airline_c_inactive
consider a window with these splits:
,----
| file1
| ---
| file2
| ---
| file1
`----

If the top buffer is the active one and you start modifying this buffer,
this will also reset the highlighting for the inactive buffer2, since
the highlighting group 'airline_c_inactive' is used for both windows
(one having the unmodified buffer 'file2' and one having the modified
'file1').

This lead to the incorrect highlighting of the buffer name of file2.

Airline basically already created different airline_c<bufnr>_inactive
highlighting groups, but unfortunately did not use them.

Therefore, make the builder aware of this and always append the buffer
number to the group 'airline_c' if it is in an inactive window.

2) we need to make sure, the highlighting won't get overwritten, so
make the highlighter aware of this situation as well, by appending the
buffer number to the group name, if it creates the 'inactive' mode
groups and a buffer number has been given.

this fixes #1233
2016-09-08 18:46:11 +02:00
Christian Brabandt 7612aaf701 Add User autocommand for Theme changing
fixes #1226
2016-08-24 21:27:49 +02:00
David Terei ae4a978509 Add spell detection 2016-03-21 23:52:04 -07:00
Kevin Ballard 4540ea428a Fix colorscheme to theme matching
Fixes #1067 for real.
2016-02-27 11:22:30 -08:00
Christian Brabandt a7eb735f2e Fix typo
fixes #1067
2016-02-26 09:20:01 +01:00
Christian Brabandt 78e1a2c8db Fix matching of themes to color names
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
2016-02-25 08:07:51 +01:00
Christian Brabandt 7efa5067ef fix performance regression 2016-02-07 22:17:17 +01:00
Christian Brabandt ac86003ac3 Problem with highlighting groups per tabpages
The current mode is only cached per window. This will break, if one
switches tabpage. We remember the last mode that was used to create the
highlighting group and compare, if this has changed.

This fixes #670
2016-02-07 09:07:00 +01:00
Bailey Ling ffe0fafa2d fix load regression errors with recent theme changes 2016-01-31 01:41:13 -05:00
Bailey Ling d7fd8ca649 remove all themes from the core repository except for the default.
resolves #923
2016-01-29 22:24:49 -05:00
Christian Brabandt d7f4fbf529 Merge pull request #902 from efirs/ef_ycm_error_warning_count
Show YouCompleteMe error and warning count in the statusline
2016-01-28 10:11:37 +01:00
Evgeny Firsov 6d81660fd8 Show YouCompleteMe error and warning count in the statusline
Signed-off-by: Evgeny Firsov <firs1978@gmail.com>
2016-01-27 23:21:16 -08:00
Bailey Ling 048b24a916 happy 2016! 2016-01-14 21:38:38 -05:00
Bailey Ling b7a2159128 Merge pull request #815 from chrisbra/disabled
fix disabled bug
2015-10-05 08:51:56 -04:00
Christian Brabandt c761566dcf fix disabled bug 2015-07-10 21:12:30 +02:00
Hendrik Purmann a0110e13bd Add checks for existing key to make #786 work in neovim 2015-06-09 18:19:16 +02:00
Christian Brabandt 9d90e2cbfe Add crypt indicator
If editing an encrypted file, add an indicator, that the file is
encrypted
2015-06-02 20:40:19 +02:00
James Clarke 0b5ef59cf5 Added support for Neovim's terminal buffer mode 2015-05-25 17:10:27 +01:00
Bailey Ling 36bc297e60 fix statusline out of sync right after colorscheme change 2015-02-27 09:09:26 -05:00
Bailey Ling 1ca6ffb6d0 happy 2015
resolves #692.
2015-02-13 21:47:43 -05:00
Bailey Ling 462ee313e7 use util getwinvar helper function 2015-01-31 12:38:46 -05:00
Christian Brabandt 3acea37fdc selectively disable airline for selected windows
(make it work with Vim 7.3)
2015-01-23 22:45:44 +01:00
Daniel Hahler 7c65176499 Add `readonly` indicator also for !&modifiable
While typically both are set (e.g. with `:help`), I am using the
modifiable setting alone to prevent editing of some files via an
autocommand (`*.css`, if `*.scss` exists).

I can also set `readonly` for this buffer, but that gets reset when
reloading the buffer, which is not the case for `modifiable`.
2014-08-28 00:23:59 +02:00
Bailey Ling bfcece76c9 add readonly mode so it can be themed independently. resolves #510 2014-05-10 14:41:21 +00:00
Bailey Ling baed8ac063 happy 2014 2014-01-19 23:44:44 -05:00
Bailey Ling 491091706f add guard for possible undefined window context (#276). 2013-10-06 09:03:47 -04:00
Bailey Ling f26c7d4143 echo warning message if duplicate statusline func gets added. 2013-10-04 10:27:49 -04:00
Bailey Ling 2f3b33daae fix solarized theme being out of sync (#288). 2013-09-27 21:36:44 -04:00
Bailey Ling c869665b16 guard against attempting to load invalid themes. 2013-09-25 00:25:20 -04:00
Bailey Ling 66d4c8c893 prevent clobbering startup info message. resolves #156. 2013-09-23 21:18:52 +00:00
Bailey Ling d74b3bfdbf fix inactive modified arrow colors (#233). 2013-09-07 13:00:10 +00:00
Bailey Ling 8b2d58af59 fill in inactive modified colors. 2013-09-05 21:34:48 +00:00
Bailey Ling 83bbd09b0e check existence of inactive modified colors before using them. 2013-09-05 21:01:08 +00:00
Bailey Ling 5754bcabce use airline_c for better predicability. 2013-09-05 20:47:38 +00:00
Bailey Ling 01d742794f basic working independent inactive modified highlights. 2013-09-05 20:45:12 +00:00
Bailey Ling c144543d03 fixes color change regression. resolves #218. 2013-09-04 15:25:55 +00:00
Bailey Ling 301fcdc64a use statusline function for better control. 2013-09-02 18:55:15 +00:00
Bailey Ling 4b33adee42 possible fix for exit code (#79). 2013-09-01 22:25:43 +00:00
Bailey Ling 0ad6deb832 Merge branch 'master' into dev
Conflicts:
	doc/airline.txt
2013-09-01 10:28:04 -04:00
Bailey Ling 62fa3c37e4 give warning section an orange color by default (#177). 2013-09-01 10:06:25 -04:00