Bash and zsh have different ways of escaping colors in the prompt, this
update checks the $SHELL environment variable and uses the correct
escape sequence for the current shell.
A known issue with this method is that $SHELL doesn't get updated when
switching shells (i.e. if you're running /bin/bash when you're in a zsh
shell) so in rare cases rendering errors may occur. A workaround which
is much slower is to parse the output of `ps -p $$` which always returns
the current shell.
It appears that pygit2 has similar to mercurial’s issue with statuses
(they are not updated) and needs to be regenerated on each call as well.
Implies to index statuses only though, that is why I used to think
pygit2 does not have this problem.
"M" flag is highlighted in yellow, "A" flag is highlighted in green,
other flags are highlighted in red. This also corresponds with the
highlighting in the output of `git status`.
Whitespace is also trimmed from the flags as the columns don't matter
much in vim statuslines, and empty columns only introduce whitespace
that looks like a bug.
Using pure-python implementation allows to use the same code in the
terminal segments (not implemented currently). It also should be more
effective. Git module is able to use pygit2 instead of command-line git
which is much faster. Mercurial module assumes that mercurial is always
accessible as a python module.
Code for repository (not file) status is untested. It exists solely for
terminal segments.
Closes#26.
The virtual column number is also default. I doubt anybody here ever
wanted to see byte offset. When it comes to a questions like alignment,
forced text width and so on only virtual columns matter. It would be
good to optionally take concealed characters into account, but vim does
not provide a way to do so (well, except recent screencol() added solely
for testing which would be hard, but not impossible, to adapt to such
needs).
Closes#25.
This should resolve the issue with duplicate paths in sys.path by only
updating sys.path if the plugin is loaded using :source instead of
:python. sys.path is now updated in source_plugin.vim, which checks if
the user has Python installed, and updates sys.path before sourcing the
actual plugin file.
Refs #17.
Refs #19.
Refs #21.
`:echoe` is unstable: unless it is already in `:try`…`:catch` block
you never know for sure whether or not it will break execution.
Thus the only valid use for `:echoe` is
try
echoe 'Msg'
endtry
: rough equivalent to `:throw` (throws, but with different message).
As this is probably not the thing you want to do
I changed it to use `:echomsg`.
There is no need in regenerating font cache in *all* directories.
Make documentation suggest to regenerate just `~/.fonts` cache
which actually changed.
For some reason the font patcher doesn't work well unless the target
font has an em size of 2048 while the font is being patched. This patch
also improves font patching in general, due to the more correct
calculation of font metrics.
Refs #14.