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.
For some reason the statusline doesn't always get redrawn automatically
after setting the statusline property for a window, and running
:redrawstatus when a buffer or window is entered seems to resolve this
issue.
Theme.get_segments() is now a generator which returns segment copies,
and it no longer handles segment content replacement.
Renderer.render() accepts a theme and a segments parameter in order to
override the default actions (calling self.get_theme() and
self.get_segments()). This is necessary to be able to cache themes and
segment contents somewhere else and provide the cached data to the
render method. The render method now also handles removing excluded
segments, which was previously handled in Theme.get_segments().
Finally, VimRenderer.render() caches all theme and segment data and
provides this data to the renderer for non-current windows.
Closes#12.
Non-current segments used the wrong contents because outdated
information was cached (self.segments was repopulated in the render()
method which was called *after* the contents was cached). Now the
contents are cached after the parent class' render() method is called so
the correct information is cached.
Closes#11.
Each window is now tagged with an UUID and this UUID is used to cache
the window's statusline contents in the Python VimRenderer in order to
avoid translating the statusline contents to and from a vimdict
unnecessarily.
Refs #11.
When Powerline is installed as a package in the system-wide
site-packages folder it can easily be enabled by adding a simple python
statement to the user's vimrc file.
Otherwise it can be added by doing a :source
path/to/plugin/vim/powerline.vim in vimrc, but the other way of doing it
works without specifying the full path as long as Powerline is installed
somewhere in sys.path.