statusline

Vim statusline does not expand color/highlight group from expression

被刻印的时光 ゝ 提交于 2019-12-14 03:49:40
问题 I wrote a function which returns a string: function! StatusBricks() let l:stat = Brick(statusbricks#ReportLinecount('raw'), { \ 'brick_color': 'LineNr', \ 'delimiter_position': 'right', \ 'delimiter_right': '❯' \ }) return l:stat endfunction The result has the following format, generated by Brick() : %#HighlightGroup#SomeData When I use the function as an expression inside the statusline I expect the highlight group to get expanded in order to colorize the appropriate statusline section: set

Vim: How to detect the mode in which the user is in, for statusline?

空扰寡人 提交于 2019-12-09 11:31:25
问题 I need a simple (or complex) way to figure out what mode the user is in. I need to know if the user is in Normal, Insert, Visual, Replace, Change etc. I am aware of the mode() function, however I can't figure out how to make it output a full string instead of just one character. My plan was to make a function which would dynamically change the statusline's background and foreground colors depending on what string mode() returns. Basically a function with a bunch of ifs and elseifs which would

How is eclipse line number status line contribution item implemented?

[亡魂溺海] 提交于 2019-12-04 04:21:12
问题 I need to update status line editor-specific information. I already have my own implementation, but I would like to take a look how is eclipse contribution item, which shows line number/column position in status line is implemented. Can anyone point me, where could I find the source code? Thanks in advance, AlexG. 回答1: I've been looking into it, it's quite involved, and I'm not sure I got the complete picture, but in case this helps someone... The declarative way of binding an Editor with the

Vim: How to detect the mode in which the user is in, for statusline?

让人想犯罪 __ 提交于 2019-12-03 13:17:20
I need a simple (or complex) way to figure out what mode the user is in. I need to know if the user is in Normal, Insert, Visual, Replace, Change etc. I am aware of the mode() function, however I can't figure out how to make it output a full string instead of just one character. My plan was to make a function which would dynamically change the statusline's background and foreground colors depending on what string mode() returns. Basically a function with a bunch of ifs and elseifs which would do it for me. There is a flaw with this approach though, I can't know which color the theme setup by