Skip to content

Instantly share code, notes, and snippets.

@kanterov
Created January 3, 2012 08:14
Show Gist options
  • Save kanterov/1554039 to your computer and use it in GitHub Desktop.
Save kanterov/1554039 to your computer and use it in GitHub Desktop.
.vimrc
:filetype plugin on
let g:C_AuthorName = 'Kanterov Gleb'
let g:C_AuthorRef = ''
let g:C_Email = '[email protected]'
let g:alternateNoDefaultAlternate = 1
set sidescroll=5
set listchars+=precedes:<,extends:>
set ignorecase
set incsearch
nmap <F4> :tabnext<CR>
imap <F4> <ESC> :tabnext<CR>
nmap <F3> :tabprev<CR>
imap <F3> <ESC> :tabprev<CR>
syntax enable
set tabstop=4
set shiftwidth=4
set autoindent
set expandtab
set nu
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 != 1 ? '%#TabLine# | ' : '')
let s .= (i == t ? '%#TabLineSel#' : '%#TabLine#')
let s .= ' '
let file = substitute(simplify(bufname(buflist[winnr - 1])), $HOME, '~', '')
if file == ''
let file = '[No Name]'
endif
let s .= (getbufvar(buflist[winnr - 1], "&mod") ? '*' : '')
let s .= file
let s .= ' '
let i = i + 1
endwhile
let s .= '%T%#TabLineFill#%='
return s
endfunction
set stal=2
set tabline=%!MyTabLine()
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment