unlet! skip_defaults_vim source $VIMRUNTIME/defaults.vim set autoindent set smartindent set nu set expandtab set shiftwidth=2 set softtabstop=2 if has('gui') set guioptions-=e endif if exists("+showtabline") function MyTabLine() let s = '' let t = tabpagenr() let i = 1 while i <= tabpagenr('$') let buflist = tabpagebuflist(i) let winnr = tabpagewinnr(i) let s .= '%' . i . 'T' let s .= (i == t ? '%1*' : '%2*') let s .= ' ' . i if tabpagewinnr(i,'$') > 1 let s .= ':' . winnr . '/' . tabpagewinnr(i,'$') endif let s .= ' %*' let s .= (i == t ? '%#TabLineSel#' : '%#TabLine#') let bufnr = buflist[winnr - 1] let file = bufname(bufnr) let buftype = getbufvar(bufnr, 'buftype') if buftype == 'nofile' if file =~ '\/.' let file = substitute(file, '.*\/\ze.', '', '') endif else let file = fnamemodify(file, ':p:t') endif if file == '' let file = '[No Name]' endif let s .= file let i = i + 1 endwhile let s .= '%T%#TabLineFill#%=' let s .= (tabpagenr('$') > 1 ? '%999XX' : 'X') return s endfunction set tabline=%!MyTabLine() endif