Commit Graph

801 Commits

Author SHA1 Message Date
Kim Silkebækken 70818341e6 Cache segment contents after rendering the statusline
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.
2012-12-17 11:30:49 +01:00
Kim Silkebækken 2a4baa0a59 Minor code cleanup 2012-12-16 13:10:55 +01:00
Kim Silkebækken 3b19dac9e7 Cleanup code and comments 2012-12-15 19:36:14 +01:00
Kim Silkebækken 0bf23adbcc Cache statusline contents in Python
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.
2012-12-15 18:50:55 +01:00
ZyX da6367a897 Added local theme support (mainly for buffer-local themes) 2012-12-14 16:10:47 +01:00
Kim Silkebækken f550bd37f8 Fix issue with function segment key generation 2012-12-14 16:03:58 +01:00
Kim Silkebækken 05505c3dd1 Restructure docs 2012-12-14 15:23:26 +01:00
Kim Silkebækken f3a03aa26a Update docs structure for gh-pages 2012-12-14 15:16:38 +01:00
ZyX 79e2f2aee6 Add a way to import extension segments from more convenient locations
I.e. not powerline.ext.{ext}.segments.{smth}, but just {smth}.

Refs #3.
2012-12-14 13:57:17 +01:00
Kim Silkebækken 21032e989e Add documentation files 2012-12-13 22:44:22 +01:00
Kim Silkebækken f074c1fb29 Move the vim example to a separate plugin folder
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.
2012-12-13 22:01:33 +01:00
ZyX 175fb1b58e Don’t change windows using windo, use setwinvar() instead 2012-12-13 21:09:41 +04:00
Kim Silkebækken 298f2776e3 Add .gitignore 2012-12-13 15:43:49 +01:00
Kim Silkebækken 82b52094a3 Add setup.py 2012-12-13 15:43:38 +01:00
Kim Silkebækken cd41910fb3 Add Sphinx docs skeleton 2012-12-13 15:43:05 +01:00
Kim Silkebækken e5c864ec1b Add themes and segments for terminal and tmux 2012-12-13 15:23:12 +01:00
Kim Silkebækken c5555d5637 Update all examples to work with the latest changes 2012-12-13 14:59:16 +01:00
Kim Silkebækken 9c79344f64 Update theme/colorscheme for tmux and terminal configs 2012-12-13 14:58:55 +01:00
Kim Silkebækken d40e8e05c8 Handle default colors correctly in tmux renderer 2012-12-13 14:58:21 +01:00
Kim Silkebækken f552979125 Simplify retrieving of config home in core init method 2012-12-13 14:57:55 +01:00
Kim Silkebækken 203a32e778 Create empty segment for single-side statuslines 2012-12-13 14:57:10 +01:00
Kim Silkebækken 9104d92555 Update default colorscheme 2012-12-13 14:28:24 +01:00
Kim Silkebækken eb28d759cc Ignore empty group/color colorscheme translations 2012-12-13 14:28:09 +01:00
Kim Silkebækken 3037b9fbf1 Memoize git branch segment in vim
This works kinda like a timer which ensures that the git branch segment
isn't called more than once every 2 seconds.

Refs #7.
2012-12-13 14:06:29 +01:00
Kim Silkebækken fbce4ac2da Add memoziation decorator 2012-12-13 14:06:25 +01:00
Kim Silkebækken 7750fa296a Fix minor segment contents override issue 2012-12-13 13:49:15 +01:00
Kim Silkebækken a272d907bc Simplify vim renderer cache check 2012-12-13 13:49:05 +01:00
Kim Silkebækken 92324a6956 Fix vim segments for empty file names/directories 2012-12-13 13:48:27 +01:00
Kim Silkebækken 98337d26ec Merge branch 'feature/project-restructuring' into develop 2012-12-13 13:18:27 +01:00
Kim Silkebækken 09c2070bce Remove unnecessary default values from vim theme 2012-12-13 13:17:05 +01:00
Kim Silkebækken dd4c90fc68 Cache and retrieve segment contents for non-current vim windows
This resolves the issue with non-current windows using the contents of
the currently selected window.
2012-12-13 13:16:09 +01:00
Kim Silkebækken 00f749c959 Allow overriding segment contents when rendering 2012-12-13 13:10:22 +01:00
Kim Silkebækken c2dfabdb8d Load segments from specific segment modules 2012-12-13 12:49:54 +01:00
Kim Silkebækken 04993264e4 Move more vim stuff into the renderer 2012-12-12 18:15:21 +01:00
Kim Silkebækken 8960d15cf5 Update vim statusline example
The statusline example mostly works now, even with different modes. The
main problem is still non-current windows, which receive the contents of
the currently active window for most segments.
2012-12-12 12:38:01 +01:00
Kim Silkebækken c6ac449af1 Fix minor issues in default theme 2012-12-12 12:36:48 +01:00
Kim Silkebækken 32f6893189 Update vim renderer to handle all vim-specific stuff 2012-12-12 12:36:27 +01:00
Kim Silkebækken e22a9241d0 Fallback to default if mode highlighting is missing 2012-12-10 20:19:44 +01:00
Kim Silkebækken ec278943b1 Fix Unicode quirks with mode segment 2012-12-10 20:18:02 +01:00
Kim Silkebækken 240bd6217d Remove powerline render() method 2012-12-10 20:17:44 +01:00
Kim Silkebækken 90f8f94468 Update vim statusline example
A major issue is that we currently can't pass any windows' mode on to
the segment rendering method, so non-current windows don't get
highlighted correctly, and segments don't get removed if they have 'nc'
in their exclude_modes setting, and statuslines in non-current windows
don't get resized until the window is focused again.
2012-12-10 20:00:26 +01:00
Kim Silkebækken 42d8353db6 Handle segment exclude/include modes 2012-12-10 19:46:54 +01:00
Kim Silkebækken 19248503ef Improve default colorscheme with more hl groups 2012-12-10 18:04:18 +01:00
Kim Silkebækken 011bacb8c3 Make the renderer work with new theme/colorscheme API 2012-12-10 17:53:47 +01:00
Kim Silkebækken d7ff3f72a6 Allow theme configuration to override dividers 2012-12-10 14:45:04 +01:00
Kim Silkebækken 87d5db9af7 Update default configuration 2012-12-10 14:36:17 +01:00
Kim Silkebækken 039526f720 Create theme loading class
This class loads all segments from the theme, initializes the highlight
group, assigns all necessary properties based on the JSON theme
configuration, etc. By doing this we basically move the mksegment()
functionality into the theme loader, so this function can be removed at
the cost of making it more complicated to use Powerline without its
theme functionality.
2012-12-10 14:23:53 +01:00
Kim Silkebækken 417f9a6909 Create colorscheme loading class 2012-12-10 14:03:49 +01:00
Kim Silkebækken 3e949adb39 Load config files and modules in core 2012-12-10 13:19:45 +01:00
Kim Silkebækken 157fff0834 Update default colorscheme 2012-12-06 17:00:59 +01:00