call Prep_Var("g:iainextracolumnsnumber", "''")
call Prep_Var("g:iainextracolumnslist", "''")
call Prep_Var("b:iaincul", 0)
+ call Prep_Var("b:iainalt", 0)
if has("signs")
call Prep_Var("g:marksigns", 0)
call Prep_Var("g:firstsign", 100)
call Mapping("<", ":call Resize_Columns('-')<CR>:<CR>")
" Clear search pattern with \/.
call Mapping("/", ":let @/=\"\"<CR>:<CR>")
+" Toggle alternate buffer name with \#.
+call Mapping("#", ":call Cycle_Alt()<CR>:<CR>")
" Set graphical window title.
if has("win32") || has("win64")
endif
endfun "}}}2
+" Helper for status line.
+" Show alternate buffer number and name.
+fun! Show_Alt() "{{{2
+ let l:alt = bufnr("#")
+ if l:alt < 0 || l:alt == bufnr("") || ! b:iainalt
+ return ""
+ endif
+
+ return " " . l:alt . ": " . expand("#:t")
+endfun "}}}2
+
" Show the status line.
fun! Show_StatusLine() "{{{2
if ! has("statusline")
return
endif
call Iain_Vars()
- let l:sl1='%2n\:\ %<%1*%f%0*\ [%{Show_List()}%{Show_Case()}%{Show_Tabstop()}%{Show_Paste()}%Y%M%R]\ '
+ let l:sl1='%2n\:\ %<%1*%f%0*\ [%{Show_List()}%{Show_Case()}%{Show_Tabstop()}%{Show_Paste()}%Y%M%R]%{Show_Alt()}\ '
let l:sl3='L:%1*%4.6l%0*/%-4.6L\ C:%1*%3.6c%0*\ \|\ %P'
let l:hexformat='%b'
if b:iainhex
endif
endfun "}}}2
+" Toggle showing alternate buffer information.
+fun! Cycle_Alt() "{{{2
+ call Iain_Vars()
+ let b:iainalt = ! b:iainalt
+ call Show_StatusLine()
+endfun "{{{2
+
" Swap hex/decimal statusline with \x.
call Mapping("x", ":call Cycle_HexStatusLine()<CR>:<CR>")
" Change statusline verbosity with \v.