Commits

José Antonio Pérez Sánchez  committed 66efbe5

first vim segment! :)

  • Participants
  • Parent commits b4db4b8

Comments (0)

Files changed (3)

 tmp
 dotfiles-installer.sh
+*.pyc

File home/config/powerline/themes/vim/default.json

 				"before": " "
 			},
 			{
+				"name": "vim_code",
+				"module": "z.powerline.segments.vim",
+				"args": { "code": "tagbar#currenttag('%s', '')" },
+				"highlight_group": ["background"],
+				"draw_divider": false
+			},
+			{
 				"type": "string",
 				"highlight_group": ["background"],
 				"draw_divider": false,

File home/config/powerline/z/powerline/segments/vim.py

 
 from __future__ import absolute_import
 from powerline.theme import requires_segment_info
+import vim
 
 @requires_segment_info
-def vim_function(segment_info):
-    return u'TEXT'
+def vim_code(segment_info, code):
+    try:
+        return vim.eval(code)
+    except Exception, e:
+        return '***'