Created
March 3, 2015 18:55
-
-
Save chartjes/de72ba0588c19ac8a139 to your computer and use it in GitHub Desktop.
My .vimrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" MAIN CUSTOMIZATION FILE | |
" | |
set nocompatible | |
filetype off | |
call pathogen#infect() | |
Helptags | |
syntax on | |
filetype plugin indent on | |
set number | |
" Enable loading filetype and indentation plugins | |
set modelines=0 | |
" by default we go with 4 space indent and spaces | |
set expandtab | |
set softtabstop=4 | |
set shiftwidth=4 | |
set tabstop=4 | |
set encoding=utf-8 | |
set fileencodings=utf-8 | |
set cursorline | |
set ruler | |
set background=dark | |
let g:solarized_termcolors=256 | |
let g:solarized_contrast="low" | |
let g:solaritez_visibility="high" | |
colorscheme solarized | |
" tab navigation | |
nmap Z :tabprev<CR> | |
nmap X :tabnext<CR> | |
" Send those damn swap files somewhere else! | |
set directory=/tmp | |
" clear out search buffer easier | |
nmap <silent> ,/ :let @/=""<CR> | |
" easily switch between vsplit windows | |
map <c-j> <C-w>j | |
map <c-k> <C-w>k | |
map <c-h> <c-w>h | |
map <c-l> <c-w>l | |
" save yourself if you forgot to use sudo to save something | |
cmap w!! w !sudo tee % >/dev/null | |
" Status line stuff stolen from Joel Perras | |
set laststatus=2 | |
" Show me when I'm getting too close to 80 characters | |
if version > 702 | |
set colorcolumn=80 | |
endif | |
" If we are using Javascript, we need 2 spaces indents and not tabs | |
autocmd FileType javascript set sw=2 | |
autocmd FileType javascript set ts=2 | |
autocmd FileType javascript set sts=2 | |
" Same thing with CoffeeScript | |
au BufNewFile,BufReadPost *.coffee setl shiftwidth=2 expandtab | |
" Tweak some things for CtrlP | |
let g:ctrlp_map = '<c-p>' | |
let g:ctrlp_cmd = 'CtrlP' | |
set wildignore+=*/tmp/*,*.so,*.swp,*.zip | |
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$' | |
let g:ctrlp_user_command = 'find %s -type f' | |
" support for supertab | |
let g:SuperTabDefaultCompletionType = "context" | |
" Git commit messages need love too | |
autocmd Filetype gitcommit setlocal spell textwidth=72 | |
" Settings for PHP CodeSniffer | |
let g:phpcs_std_list="PSR2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment