Skip to content

Instantly share code, notes, and snippets.

@brentfisher
Created April 20, 2015 19:09
Show Gist options
  • Save brentfisher/244c02d6b992b2d25336 to your computer and use it in GitHub Desktop.
Save brentfisher/244c02d6b992b2d25336 to your computer and use it in GitHub Desktop.
Sample .VIMRC
set noswapfile " removes annoying .swp files when opening the same file multiple times
set number " line numbers
syntax on " try to autoread syntax (based on filename)
" relative line numbers below > VIM 7.4
" set relativenumber
" Tab stuff, I perfer to use two spaces instead of hard tabs
set tabstop=2 " this is when you open a file with hard tabs in it, <TAB>
set softtabstop=2 " these are tabs when editing, so pressing TAB in insert mode
set shiftwidth=2
set expandtab " tabs are spaces!
" Press F2 to enable paste mode, which will keep the formatting of pasted text, useful for pasting code
set pastetoggle=<F2>
" when in command mode, press tab and it will pop open a window and try to suggest commands
set wildmenu
set wildmode=longest:full,full
" if you are tabbed in a few spaces, and you do other actions, for
" example o, it will automatically tab you to where the previous line was
set autoindent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment