Lokaltog/vim-powerline — Issue #108: Segment for sass-status
Author: skwp
Created: 2012-03-08 07:45:47+00:00
State: open

There's not a whole lot of docs on creating segments, so I took a stab by reverse engineering the fugitive status. There's a very nice plugin called https://github.com/aaronjensen/vim-sass-status which provides an indicator of the css selector that you're on when you're inside deeply nested sass.

This status can be gotten by calling 'sass_status#statusline()' - I tried to implement this segment like this

let g:Powerline#Segments#sass#segments = Pl#Segment#Init(['sass',
\ (exists('g:autoloaded_sass_status') && g:autoloaded_sass_status== 1),
\
\ Pl#Segment#Create('status', '%{sass_status#statusline()}', Pl#Segment#Modes('!N'))
\ ])

Do you see anything that's obviously wrong here? I'm getting nothing showing up in my status line. If you give me a little push in the right direction, I'll try to implement this and submit as a pull.

I'm also wondering if the ugly backslash escapes are really necessary here. You can't split a function call into multiple lines otherwise?

thanks!
Yan