Skip to content

Instantly share code, notes, and snippets.

@brentfisher
Last active August 29, 2015 14:19
Show Gist options
  • Save brentfisher/a0f74be98773b48617c4 to your computer and use it in GitHub Desktop.
Save brentfisher/a0f74be98773b48617c4 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
filetype indent on
" highlight search results
set hlsearch
@brentfisher
Copy link
Author

@ausmith
Copy link

ausmith commented Apr 20, 2015

For fun vim challenges: http://vimgolf.com/

https://github.com/tpope/vim-pathogen is the pathogen plugin manager I mentioned in the presentation.

color desert is my preferred color scheme. 😄 Easier on the eyes with a dark color scheme for your terminal window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment