if version >= "600"
version 6.0
-" Allow room for numbers.
-se numberwidth=5
-
" Track changing number mode.
let g:numbercols=&columns
let g:numberchanges=0
" Cycle between number mode.
" FIXME: Toggling in a split window doesn't work properly. We need to track
" the number of windows and number modes. Something for later...
+" Perhaps have a redraw callback that checks width and original column number.
fun! Cycle_Number()
if &number
" Restore width.
" Expand if this was the first change.
if g:numberchanges == 0
let g:numbercols=&columns
- let &columns=&columns+&numberwidth
+ if version >= 700
+ " Expand column by our preferred width.
+ let &columns=&columns+&numberwidth
+ else
+ " Vim 6 hardcodes width to 8.
+ let &columns=&columns+8
+ endif
endif
" Track changes.
if version >= "700"
version 7.0
+" Set size of numbers column.
+se numberwidth=5
+
" Add "previous tab" mapping as gb.
map gb :tabPrev<CR>
endif