Skip to content

Instantly share code, notes, and snippets.

@tstelzer
Created March 10, 2017 15:34
Show Gist options
  • Select an option

  • Save tstelzer/03b083c3c6df1b20f290565988a04e6e to your computer and use it in GitHub Desktop.

Select an option

Save tstelzer/03b083c3c6df1b20f290565988a04e6e to your computer and use it in GitHub Desktop.
minimal modeline
function! ModeColor(mode)
let s:modes = {
\ 'n': '%#Normal#',
\ 'v': '%#Visual#',
\ 'V': '%#Visual#',
\ '': '%#Visual#',
\ }
if !has_key(s:modes, a:mode)
return '%#User3#' " default
else
return s:modes[a:mode]
endif
endfunction
let &l:statusline = ModeColor(mode())
setlocal stl+=%{mode()}
@Lilja
Copy link
Copy Markdown

Lilja commented Mar 10, 2017

Maybe you did not see the IRC ping but i actually solved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment