Add Tagbar current tag segment
This commit is contained in:
parent
0fc79d2849
commit
d0429ac023
|
@ -32,7 +32,8 @@
|
||||||
"modified_buffers": { "fg": "brightyellow", "bg": "gray2" },
|
"modified_buffers": { "fg": "brightyellow", "bg": "gray2" },
|
||||||
"environment": { "fg": "gray8", "bg": "gray2" },
|
"environment": { "fg": "gray8", "bg": "gray2" },
|
||||||
"error": { "fg": "brightestred", "bg": "darkred", "attr": ["bold"] },
|
"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": {
|
"mode_translations": {
|
||||||
"nc": {
|
"nc": {
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
"environment": { "fg": "gray61", "bg": "royalblue5" },
|
"environment": { "fg": "gray61", "bg": "royalblue5" },
|
||||||
"error": { "fg": "oldlace", "bg": "red", "attr": ["bold"] },
|
"error": { "fg": "oldlace", "bg": "red", "attr": ["bold"] },
|
||||||
"warning": { "fg": "oldlace", "bg": "orange", "attr": ["bold"] }
|
"warning": { "fg": "oldlace", "bg": "orange", "attr": ["bold"] }
|
||||||
|
"current_tag": { "fg": "oldlace", "bg": "royalblue5", "attr": ["bold"] }
|
||||||
},
|
},
|
||||||
"mode_translations": {
|
"mode_translations": {
|
||||||
"nc": {
|
"nc": {
|
||||||
|
|
|
@ -61,7 +61,15 @@
|
||||||
{
|
{
|
||||||
"exclude_modes": ["nc"],
|
"exclude_modes": ["nc"],
|
||||||
"module": "powerline.segments.plugin.syntastic",
|
"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",
|
"type": "string",
|
||||||
|
|
|
@ -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", "")')
|
Loading…
Reference in New Issue