Skip to content

Instantly share code, notes, and snippets.

@TroyFletcher
Last active November 2, 2015 16:54
Show Gist options
  • Save TroyFletcher/e9652bd84d193d8c8066 to your computer and use it in GitHub Desktop.
Save TroyFletcher/e9652bd84d193d8c8066 to your computer and use it in GitHub Desktop.
Append total line count after current line number on default airline statusline (IE: from 12 to 12/34)
" Off the basic output [echom g:airline_section_z] I've added /%L after the %4l
" and moved the %#__restore__# to keep only the current line bold
" Added canonically according to https://github.com/bling/vim-airline/issues/482
function! AirlineInit()
let g:airline_section_z = '%3p%% %{g:airline_symbols.linenr}%#__accent_bold#%4l%#__restore__#/%L:%3v'
endfunction
autocmd VimEnter * call AirlineInit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment