diff --git a/powerline-vim-example.py b/powerline-vim-example.py deleted file mode 100755 index ddcb1855..00000000 --- a/powerline-vim-example.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -'''Powerline vim statusline example. -''' - -from lib.core import Segment -from lib.renderers import VimSegmentRenderer - -powerline = Segment([ - Segment('NORMAL', 22, 148, attr=Segment.ATTR_BOLD), - Segment('⭠ develop', 247, 240, priority=10), - Segment([ - Segment(' ~/projects/powerline/lib/', draw_divider=False), - Segment('core.py ', 231, attr=Segment.ATTR_BOLD), - ], 250, 240, padding=''), - Segment('%=%<', filler=True), - Segment([ - Segment('unix', priority=50), - Segment('utf-8', priority=50), - Segment('python', priority=50), - Segment('83%', 247, 240, priority=30), - Segment([ - Segment('⭡', 239), - Segment('23', attr=Segment.ATTR_BOLD, padding='', draw_divider=False), - Segment(':1', 244, priority=30, padding='', draw_divider=False), - ], 235, 252), - ], 245, side='r'), -], bg=236) - -renderer = VimSegmentRenderer() -stl = powerline.render(renderer) - -print(renderer.get_hl_statements()) -print('let &stl = "{0}"'.format(stl)) diff --git a/powerline-vim-example.vim b/powerline-vim-example.vim index 997e184d..faf04f87 100644 --- a/powerline-vim-example.vim +++ b/powerline-vim-example.vim @@ -2,20 +2,6 @@ " Run with :source % let s:did_highlighting = 0 -let s:segments = [ - \ { 'contents': 'mode()', 'fg': 22, 'bg': 148, 'attr': 1 }, - \ { 'contents': '"⭠ develop"', 'fg': 247, 'bg': 240, 'priority': 10 }, - \ { 'contents': '" ".expand("%:p:h")."/"', 'fg': 250, 'bg': 240, 'padding': '', 'draw_divider': 0, 'priority': 5 }, - \ { 'contents': 'expand("%:p:t")." "', 'fg': 231, 'bg': 240, 'padding': '', 'attr': 1 }, - \ { 'filler': 1 }, - \ { 'contents': '&ff', 'fg': 245, 'bg': 236, 'side': 'r', 'priority': 50 }, - \ { 'contents': '&fenc', 'fg': 245, 'bg': 236, 'side': 'r', 'priority': 50 }, - \ { 'contents': '&ft', 'fg': 245, 'bg': 236, 'side': 'r', 'priority': 50 }, - \ { 'contents': '(line(".") * 100 / line("$") * 100) / 100 . "%%"', 'fg': 247, 'bg': 240, 'side': 'r', 'priority': 30 }, - \ { 'contents': '"⭡"', 'fg': 239, 'bg': 252, 'side': 'r' }, - \ { 'contents': 'line(".")', 'fg': 239, 'bg': 252, 'side': 'r', 'attr': 1, 'padding': '', 'draw_divider': 0 }, - \ { 'contents': '":". col(".")', 'fg': 244, 'bg': 252, 'side': 'r', 'padding': '', 'draw_divider': 0, 'priority': 30 }, -\ ] function! DynStl() python <