Skip to content

Instantly share code, notes, and snippets.

@chartjes
Last active August 29, 2015 14:04
Show Gist options
  • Save chartjes/81a296a556ba89fd85e3 to your computer and use it in GitHub Desktop.
Save chartjes/81a296a556ba89fd85e3 to your computer and use it in GitHub Desktop.
My .vimrc
"
" MAIN CUSTOMIZATION FILE
"
set nocompatible
filetype off
call pathogen#infect()
syntax on
filetype plugin indent on
" 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
============
And here are the plugins I am using
├── autoload
│   ├── netrw.vim
│   ├── netrwFileHandlers.vim
│   ├── netrwSettings.vim
│   └── pathogen.vim
├── bundle
│   ├── closetag.vim
│   ├── ctrlp.vim
│   ├── nerdcommenter
│   ├── pb.vim
│   ├── supertab
│   ├── syntastic
│   ├── vim-airline
│   ├── vim-bad-whitespace
│   ├── vim-coffee-script
│   ├── vim-gitgutter
│   ├── vim-golang
│   ├── vim-javascript
│   ├── vim-repeat
│   ├── vim-surround
│   └── vim-twig
├── colors
│   └── solarized.vim
├── doc
│   ├── pi_netrw.txt
│   └── tags
├── plugin
│   └── netrwPlugin.vim
├── spell
│   ├── en.utf-8.add
│   └── en.utf-8.add.spl
└── syntax
└── netrw.vim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment