Skip to content

Instantly share code, notes, and snippets.

@fannheyward
Created April 9, 2011 09:16
Show Gist options
  • Save fannheyward/911263 to your computer and use it in GitHub Desktop.
Save fannheyward/911263 to your computer and use it in GitHub Desktop.
statusline for vim, via newsmth.
set laststatus=2 " always show the status line
let statusHead ="%-.50f\ %h%m%r"
let statusBreakPoint ="%<"
let statusSeparator ="|"
let statusFileType ="%{((&ft\ ==\ \"help\"\ \|\|\ &ft\ ==\ \"\")?\"\":\"[\".&ft.\"]\")}"
let statusFileFormat ="[%{(&ff\ ==\ \"unix\")?\"u\":\"d\"}]"
let statusAscii ="\{%b:0x%B\}"
let statusCwd ="%-.50{getcwd()}"
let statusBody =statusFileType.statusFileFormat.statusSeparator.statusAscii.statusSeparator."\ ".statusBreakPoint.statusCwd
let statusEncoding ="[%{(&fenc\ ==\ \"\"?&enc:&fenc).(&bomb?\",BOM\":\"\")}]"
let statusBlank ="%="
let statusKeymap ="%k"
let statusRuler ="%-12.(%lL,%c%VC%)\ %P"
let statusTime ="%{strftime(\"%y-%m-%d\",getftime(expand(\"%\")))}"
let statusEnd=statusKeymap."\ ".statusEncoding.statusRuler."\ ".statusTime
let statusString=statusHead.statusBody.statusBlank.statusEnd
set statusline=%!statusString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment