1

I am using vim-tinyline and it doesn't seem to have an option for this and I have no idea how to write a function to do this.

Example function from tinyline that checks whether the file has been modified:

function! TlModified() " {{{                                        
  " Make sure we ignore &modified when choosewin is active          

  let choosewin = exists('g:choosewin_active') && g:choosewin_active
  return &modified && ! choosewin ? ' ⚫' : ''                      
endfunction     

This one returns a if the file has been modified. How would I do something similar if spell is set?

2
  • 5
    Just replace &modified with &spell? Jan 6 '17 at 18:09
  • now I feel dumb
    – hermancain
    Jan 6 '17 at 19:56
1

Thanks to user Carpetsmoker above in the comments it was really simple, this is what I ended up with:

function! TlSpell() " {{{ 
  " Returns spell state   
  return &spell ? '⚫' : ''
endfunction    

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.