Skip to content

Instantly share code, notes, and snippets.

@gaobocn-zz
Created February 10, 2017 21:41
Show Gist options
  • Save gaobocn-zz/db9176de748a6835b6d8fa8c080a3e7e to your computer and use it in GitHub Desktop.
Save gaobocn-zz/db9176de748a6835b6d8fa8c080a3e7e to your computer and use it in GitHub Desktop.
My .vimrc
colorscheme desert
syntax on
set hlsearch
set nu
"smartindent
set si
"enable backspace
set backspace=2
"expand tab to space
set tabstop=4
set expandtab
set softtabstop=4
set shiftwidth=4
"show tabs and trailing space
set listchars=tab:>-,trail:~,extends:>,precedes:<
set list
"make move between broken line easier
map j gj
map k gk
"scroll offset
set so=5
"status bar setting
set statusline=
set statusline+=%1*\ %n\ %{&ff}%y%*
set statusline+=%2*\ %<%F%m%*
set statusline+=%3*%=%*
set statusline+=%4*\ %l/%L\ (%p%%)%4v%*
set statusline+=%5*\ 0x%04B\ %*
set laststatus=2
hi User1 ctermfg=Red ctermbg=Gray
hi User2 ctermfg=DarkCyan ctermbg=Gray
hi User3 ctermfg=White ctermbg=Gray
hi User4 ctermfg=Magenta ctermbg=Gray
hi User5 ctermfg=Yellow ctermbg=Gray
set cmdheight=2
set completeopt=longest,menuone
filetype plugin indent on
set nobackup
"Auto strip trailing whitespaces
autocmd BufWritePre * :%s/\s\+$//e
ab inc include
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment