Add Tagbar current tag segment

This commit is contained in:
Kim Silkebækken 2013-08-20 17:26:36 +02:00
parent 0fc79d2849
commit d0429ac023
4 changed files with 24 additions and 2 deletions

View File

@ -32,7 +32,8 @@
"modified_buffers": { "fg": "brightyellow", "bg": "gray2" },
"environment": { "fg": "gray8", "bg": "gray2" },
"error": { "fg": "brightestred", "bg": "darkred", "attr": ["bold"] },
"warning": { "fg": "brightyellow", "bg": "darkorange", "attr": ["bold"] }
"warning": { "fg": "brightyellow", "bg": "darkorange", "attr": ["bold"] },
"current_tag": { "fg": "gray9", "bg": "gray2" }
},
"mode_translations": {
"nc": {

View File

@ -32,6 +32,7 @@
"environment": { "fg": "gray61", "bg": "royalblue5" },
"error": { "fg": "oldlace", "bg": "red", "attr": ["bold"] },
"warning": { "fg": "oldlace", "bg": "orange", "attr": ["bold"] }
"current_tag": { "fg": "oldlace", "bg": "royalblue5", "attr": ["bold"] }
},
"mode_translations": {
"nc": {

View File

@ -61,7 +61,15 @@
{
"exclude_modes": ["nc"],
"module": "powerline.segments.plugin.syntastic",
"name": "syntastic"
"name": "syntastic",
"priority": 50
},
{
"exclude_modes": ["nc"],
"module": "powerline.segments.plugin.tagbar",
"name": "current_tag",
"draw_soft_divider": false,
"priority": 50
},
{
"type": "string",

View File

@ -0,0 +1,12 @@
# vim:fileencoding=utf-8:noet
import vim
from powerline.segments.vim import window_cached
@window_cached
def current_tag(pl):
if not int(vim.eval('exists(":Tagbar")')):
return
return vim.eval('tagbar#currenttag("%s", "")')