diff --git a/.vimrc b/.vimrc index d21c06c3..1372d204 100644 --- a/.vimrc +++ b/.vimrc @@ -24,8 +24,13 @@ call plug#end() " Defaults let g:Powerline_symbols = 'fancy' set relativenumber +set number set fdm=syntax -colorscheme srcery +" set notermguicolors t_Co=256 +" set termguicolors +" colorscheme srcery +colorscheme default +let g:airline_theme='base16' set hlsearch set tabstop=4 set shiftwidth=4 @@ -48,3 +53,66 @@ autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=0 " CTRL-P let g:ctrlp_map = '' let g:ctrlp_cmd = 'CtrlP' + +" Tab control +nnoremap 1 1gt +nnoremap 2 2gt +nnoremap 3 3gt +nnoremap 4 4gt +nnoremap 5 5gt +nnoremap 6 6gt +nnoremap 7 7gt +nnoremap 8 8gt +nnoremap 9 9gt +nnoremap 0 0gt +nnoremap ` gt + +" Shortcuts +nnoremap :set number!:set relativenumber! +nnoremap :NERDTreeToggle +nnoremap :set wrap! +nnoremap :w +nnoremap :source ~/.vimrc + +" Tab Numbers +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 .= ' [' + let s .= i . ':' + let s .= winnr . '/' . tabpagewinnr(i,'$') + 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 stal=2 + set tabline=%!MyTabLine() +endif