se expandtab
" And << and >> indent by 2.
se sw=2
+" Backspace deletes full tab width at the start of a line.
+se smarttab
" Allow backspace to delete before start of line.
se bs=2
+" Don't jump to the start of the line when using H, L etc.
+se nosol
+
" Show the ruler.
se ruler
" Show partial commands in the ruler.
" cross-platform.
se ssop+=unix,slash
+" How often do we need to use ^A/^X on octals?
+se nf=hex
+
" Nuke any pre-existing autocommands.
augroup Display
autocmd!
" Change list mode.
fun! Cycle_List()
- let basic='tab:\\_,trail:_,extends:<,precedes:>'
+ " Pretty UTF-8 listchars.
+ if has('multi_byte') && (&tenc =~? '^u\(tf\|cs\)' || (! strlen(&tenc) && &enc =~? '^u\(tf\|cs\)')) && v:version >= "602"
+ let basic='tab:»·,trail:…,extends:«,precedes:»'
+ let eol='eol:¶'
+ if version >= "700"
+ let basic=basic . ',nbsp:•'
+ endif
+ else
+ let basic='tab:\\_,trail:_,extends:<,precedes:>'
+ let eol='eol:$'
+ if version >= "700"
+ let basic=basic . ',nbsp:+'
+ endif
+ endif
call Iain_Vars()
let b:iainlist = b:iainlist + 1
if b:iainlist > 2
exec "set lcs=" . basic
set list
else
- exec "set lcs=" . basic . ",eol:$"
+ exec "set lcs=" . basic . "," . eol
set list
endif
endfun