Dictionary is an overkill here. Tuple is faster. Also now the whole tuple can be
seen on the 1/4 of my screen (32x119 characters) and colors are easier to find
(useful only when seeking for normal color names).
Again, it would be goot to ignore flake8 in this case. Without comments it
complains about it is not easy to find requested color by hand
- Splitted colorschemes into colors definitions file (TODO: remove non-colors
definitions like weather_condition_hot and base00) and actual colorscheme.
- Removed dictionary containing groups definitions for all groups for all modes,
now colorscheme is queried for this each time.
- Moved determination of colors from theme to renderer.
- Added gradients definitions (actually, only one) to new colors file.
- Made line_percent with gradient=True use new gradients.
Related changes:
- Moved all non-ASCII symbols into `segment_data`
- Added --config_path, replaced nargs='*' with better action='append'
- Added g:powerline_config_path vim option
- Added ipython overrides (via additional arguments to setup() or c.Powerline)
TODO: support for non-string scalars in vim overrides.
Fixes#231
It was used solely for Segment.get (the only place where it was used just saved
its .get() method, throwing away instance itself) and looks more like abusal of
the purpose of the classes
Removed autocommands as well. Powerline() function is now responsible both for
displaying powerline and for updating statuslines. No cmdwin events not
triggered workaround nonsense anymore.
Fixes#237Fixes#236Fixes#222Fixes#232
- Removed *args: segments are not receiveing any non-keyword arguments so no
need to bother with *args at all.
- Replaced additional_cache_key with cache_key: all functions that formerly used
additional_cache_key appear not to need initial arguments as cache keys. It
also simplifies the code.
- Made _cache be defined in __init__, it is much easier to implement cache
purging this way.
Ref #205Fixes#208
Allows more precise icon selection and purges out unicode characters from
configuration.
Note: windy icon needs reworking, I used a trigram for it.
Fixes#203.
API changes done:
- memoize additional_key function now accepts all function arguments
- get_theme now receives matcher_info
- render now receives segment_info and matcher_info, but segments and themes
were removed
- due to very different ways of obtaining column information col_current
splitted back to col_current and virtcol_current. The former should be false
in case of horizontal scrollbind (when &scrollopt contains hor)
- added requires_segment_info decorator for convenience
Other changes:
- removed all vim function calls that were possible to remove
- removed direct vim.eval calls
This is faster then super() calls and also more convenient.
Fixes#142 just as well
Conflicts:
powerline/renderers/bash_prompt.py
powerline/renderers/ipython.py
powerline/renderers/shell.py
powerline/renderers/zsh_prompt.py
What does hl() mean? It looks like “highlight an empty string”, but is actually
“reset highlight style”. In addition if you are writing “hl()” function for new
renderer you need to care about “contents” variable (in two places!: None for
super() call and (contents or u'') after super() call) though function is
actually doing nothing with it. It is just inconvenient.