Commit Graph

801 Commits

Author SHA1 Message Date
Kim Silkebækken 7e214a65b0 Create tmux segments
Refs #44.
2013-01-11 13:37:22 +01:00
Kim Silkebækken 7eb3bfde9c Update memoize class and add support for persistent cache 2013-01-11 12:18:17 +01:00
Kim Silkebækken bba272e0bd Update theme/colorscheme name properties 2013-01-09 16:16:33 +01:00
Kim Silkebækken 8d584d059d Move segments.core packages out of subdirectories 2013-01-09 16:09:50 +01:00
Kim Silkebækken 4c2dd90e9d Create terminal/prompt color scheme 2013-01-09 14:40:32 +01:00
Kim Silkebækken d0d35cac34 Move terminal prompt script to extension directory 2013-01-09 14:40:06 +01:00
Kim Silkebækken 2ceec25713 Update terminal segments and default theme 2013-01-09 14:29:44 +01:00
Kim Silkebækken 44fb24dee6 Fix padding issue with single-sided statuslines 2013-01-09 14:29:01 +01:00
Kim Silkebækken a26d5e5319 Add troubleshooting info for Windows gVim + git users
Closes #36.
2013-01-09 13:18:53 +01:00
Kim Silkebækken 536120aab8 Re-add note about PyPI which got removed from the docs
Refs #34.
2013-01-08 15:01:28 +01:00
ZyX 424da8b573 Don’t raise an exception when encountered untracked file 2013-01-07 08:21:59 +01:00
ZyX 332dc45bf9 Add additional_key to memoization function
Closes #29.
2013-01-07 08:21:40 +01:00
ZyX 5b43960e0e Recreate git.Repository() on each call
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.
2013-01-07 08:18:21 +01:00
Kim Silkebækken 3addf44a6d Highlight VCS flags differently
"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.
2013-01-04 15:02:40 +01:00
ZyX 102e749093 Add file_vcs_status segment, using powerline.lib.vcs instead of fugitive
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.
2013-01-04 14:52:55 +01:00
ZyX ca1225b864 Add virtcol parameter for col_current segment
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.
2013-01-03 07:33:27 +01:00
ZyX-I f67a004548 Use shorter and more readable form of :source 2013-01-02 21:41:10 +01:00
ZyX bfc29749c1 Use better name for powerline variable in global scope
It is completely possible that “pl” will be claimed by some other plugin
as well. There is no local scope for each .vim file in vim-python
interface.
2013-01-02 21:39:34 +01:00
ZyX 7fb3df28b9 Change code to use vim_get_func('fnameescape')
Previous version had problems with paths containing backslashes and/or
double quotes.
2013-01-02 21:39:18 +01:00
Kim Silkebækken ee0acef49c Fix issues with the Arch Linux PKGBUILD 2013-01-02 09:09:05 +01:00
Kim Silkebækken 7a7c971bd1 Move plugin loading with :source into separate file
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.
2013-01-02 08:38:28 +01:00
ZyX-I 2be52ed039 Purge out :echoe
`: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`.
2013-01-02 08:16:38 +01:00
Kim Silkebækken f423ba11c8 Add information about Python support 2012-12-21 11:20:50 +01:00
Kim Silkebækken d87b35d094 Fallback to line_percent highlighting for gradient segment 2012-12-21 11:20:50 +01:00
Kim Silkebækken 9f60daaf78 Use :file: for file references in the docs 2012-12-20 16:20:56 +01:00
Kim Silkebækken 9cc1233307 Add configuration docs 2012-12-20 15:47:01 +01:00
Kim Silkebækken 50fa8a33ca Update docs and README 2012-12-19 14:46:14 +01:00
ZyX-I 69f726af1a Purge out the requirement to use sudo
There is no need in regenerating font cache in *all* directories. 
Make documentation suggest to regenerate just `~/.fonts` cache 
which actually changed.
2012-12-19 08:36:41 +04:00
Kim Silkebækken 366fefdfd3 Update fontpatcher symbol font metrics 2012-12-18 22:28:43 +01:00
Kim Silkebækken e5f5df8a12 Correctly handle glyph widths when patching fonts 2012-12-18 22:28:27 +01:00
Kim Silkebækken 7c1d48a2fd Improve font patcher
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.
2012-12-18 22:05:28 +01:00
Kim Silkebækken def9091662 Update installation instructions
Closes #13.
2012-12-18 17:18:37 +01:00
Kim Silkebækken 7507045143 Add screenshots to README 2012-12-18 16:08:39 +01:00
Kim Silkebækken bda5c59889 Add screenshots to docs 2012-12-18 16:03:15 +01:00
Kim Silkebækken e89ce2c7db Fix minor flake8 issues in font patcher 2012-12-18 15:30:03 +01:00
Kim Silkebækken d28003c973 Add font patcher docs 2012-12-18 15:22:31 +01:00
Kim Silkebækken 53fbfe15fe Update symbol code points in the default config 2012-12-18 15:22:08 +01:00
Kim Silkebækken 5fde2dcd9d Add font patcher symbol font 2012-12-18 15:21:03 +01:00
Kim Silkebækken 9a5b94dc28 Add font patcher script 2012-12-18 15:20:56 +01:00
Kim Silkebækken af1f3ec7bd Move vim plugin to the vim extension directory 2012-12-17 15:45:23 +01:00
Kim Silkebækken 37b43a77fc Automatically push docs with `make gh-pages` 2012-12-17 15:32:49 +01:00
Kim Silkebækken df0244700c Fix typo in doc filename 2012-12-17 15:32:01 +01:00
Kim Silkebækken 9ba8570bf7 Update documentation and version 2012-12-17 15:24:42 +01:00
Kim Silkebækken 8ccf223213 Add PKGBUILD for Arch Linux users 2012-12-17 15:23:33 +01:00
Kim Silkebækken 254473419b Remove unnecessary init file 2012-12-17 15:01:56 +01:00
Kim Silkebækken ea760ea1d4 Move plugins to powerline directory 2012-12-17 14:58:13 +01:00
Kim Silkebækken 8ca4c531e9 Do a :redrawstatus after setting window statuslines
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.
2012-12-17 13:40:32 +01:00
Kim Silkebækken 11082311aa Update readonly/modified segments in default theme 2012-12-17 13:33:29 +01:00
Kim Silkebækken ccd6b4c28a Restructure segment rendering methods
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.
2012-12-17 13:26:38 +01:00
Kim Silkebækken 3a8e64b767 Pass the current window as a parameter to the render method
This change simplifies the code somewhat as the BufLeave, etc. autocmds
aren't required anymore.
2012-12-17 12:03:13 +01:00