If somebody needs to readd it he should make better code, specifically:
- Functions and variables necessary for supporting Control-P need to be defined
in a separate initialiazation function that is only called if Control-P was
found.
- Segments that show different information must be defined as separate segments
that may be put into configuration file.
- Segment functions must not know side they are on.
- Segment functions must not emit `priority`, it must go to configuration file.
- Segment functions must have proper documentation.
- Segment functions must not emit `width` and `align` keys.
- String `Loading...` or the equivalent must be overridable from configuration,
same for other interface strings (e.g. what is shown when `regex` is true).
- Segment functions must have names that make it clear what they emit.
Closes#1244
Among other benefits (i.e. correct fall back to ascii theme when Vim uses
non-unicode encoding) this should also fix travis tests: apparently travis is
not setting LANG or similar environment variables to some unicode locale, so
tests are failing.
Specifically I searched for all lines that are more then one tab off compared to
the previous line with
BufGrep /\(^\t\+\)\S.*\n\1\t\t\+/
and replaced them with something more appropriate. Most of time this resulted in
a few more newlines, but there are cases when I used mixed tabs/spaces
indentation+alignment.
Note: by default this segment is disabled. Until #923 it may only be enabled by
copying the whole file and changing "enabled" to "true". After #923 it may be
enabled by having `~/.config/powerline/themes/vim/default.json` with the
following contents:
{
"segment_data": {
"trailing_whitespace": {
"display": true
}
}
}
Fixes#388