Skip to content

Instantly share code, notes, and snippets.

@tgerulaitis
Last active August 29, 2015 13:57
Show Gist options
  • Save tgerulaitis/9765603 to your computer and use it in GitHub Desktop.
Save tgerulaitis/9765603 to your computer and use it in GitHub Desktop.
My .vimrc
" Syntax highlighting
syntax on
" Tabs to spaces
set shiftwidth=4
set tabstop=4
set softtabstop=4
set expandtab
" Autoindent, autosearch & autoreload
set autoindent
set smartindent
set incsearch
set autoread
" Visuals
set background=light
set number
set showtabline=2
set wildmenu
" Backup and Swap options
set nobackup
set nowritebackup
set directory=~/.vim/tmp//,.,~/tmp,/var/tmp
" Button mappings
inoremap <C-CR> <Esc>
nnoremap <C-CR> i
inoremap <8d> <Esc>o
nnoremap <8d> o
" Mouse support
set mouse=a
" Filetype specific settings
au BufEnter,BufRead Makefile set noexpandtab
au BufEnter,BufRead *.yaml\|*.yml set shiftwidth=2 tabstop=2 softtabstop=2
au BufEnter,BufRead *.xml\|*.*html\|*.php source ~/.vim/scripts/closetag.vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment