Skip to content

Instantly share code, notes, and snippets.

@nobitagit
Created June 19, 2016 11:33
Show Gist options
  • Save nobitagit/88f2c77d1ffbc4e2bc78718b1bd8c121 to your computer and use it in GitHub Desktop.
Save nobitagit/88f2c77d1ffbc4e2bc78718b1bd8c121 to your computer and use it in GitHub Desktop.
My vimrc
" A minimal vimrc for new vim users to start with.
" Referenced here: http://vimuniversity.com/samples/your-first-vimrc-should-be-nearly-empty
" If you don't understand a setting in here, just type ':h setting'.
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" Make backspace behave in a sane manner.
set backspace=indent,eol,start
" Switch syntax highlighting on
syntax on
" Enable file type detection and do language-dependent indenting.
filetype plugin indent on
" Show line numbers
set number
" Allow hidden buffers, don't limit to 1 file per window/split
set hidden
" start Pathogen
execute pathogen#infect()
set background=dark
colorscheme solarized
let g:airline_powerline_fonts = 1
" Always show current position
set ruler
" Ignore case when searching
set ignorecase
" Highlight search results
set hlsearch
" Makes search act like search in modern browsers
set incsearch
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
" """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" " Use spaces instead of tabs
set expandtab
" Be smart when using tabs ;)
set smarttab
" 1 tab == 4 spaces
set shiftwidth=2
set tabstop=2
" Linebreak on 500 characters
set lbr
set tw=500
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
" Make vim gutter realtime
let g:gitgutter_realtime = 1
let g:gitgutter_eager = 1
set updatetime=250
" activate vim gutter on startup
autocmd BufWinEnter * :GitGutterEnable
if has("gui_running")
" activate nerdtree and focus the file edited
autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd p
"set guioptions-=T " remove toolbar
"set guioptions-=e " Disable GUI tabs
set guioptions-=L " remove left scrollbar
set guioptions-=r " remove right scrolbar
"set t_Co=256
"set guitablabel=%M\ %t
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment