Skip to content

Instantly share code, notes, and snippets.

@yelban
Forked from sarah-j-smith/simple-vimrc
Created December 26, 2019 01:26
Show Gist options
  • Save yelban/c83e2c5e6d68566b1afb60b925a8421f to your computer and use it in GitHub Desktop.
Save yelban/c83e2c5e6d68566b1afb60b925a8421f to your computer and use it in GitHub Desktop.
Simple .vimrc for Mac OSX
" Use spaces instead of tabs
set expandtab
" Be smart when using tabkey
set smarttab
" 1 tab == 4 spaces
set shiftwidth=4
set tabstop=4
" Enable filetype plugins
filetype plugin on
filetype indent on
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
" Set to auto read when a file is changed from the outside
set autoread
" Configure backspace so it acts as it should act
set backspace=eol,start,indent
" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2
" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500
" Enable syntax highlighting
syntax enable
" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8
" Use Unix as the standard file type
set ffs=unix,dos,mac
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile
" Return to last edit position when opening files (You want this!)
autocmd BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal! g`\"" |
\ endif
" Remember info about open buffers on close
set viminfo^=%
filetype plugin indent on
syntax on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment