Skip to content

Instantly share code, notes, and snippets.

@GustavoCaso
Last active July 12, 2016 21:37
Show Gist options
  • Save GustavoCaso/801031d7bcfbfcaba476 to your computer and use it in GitHub Desktop.
Save GustavoCaso/801031d7bcfbfcaba476 to your computer and use it in GitHub Desktop.
Vim configuration
## Plugins
1. curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
2. cd ~/.vim/bundle && git clone https://github.com/scrooloose/nerdtree.git
3. cd ~/.vim/bundle && git clone https://github.com/kien/ctrlp.vim.git
4. cd ~/.vim/bundle && git clone git://github.com/tpope/vim-fugitive.git
5. cd ~/.vim/bundle && git clone git@github.com:altercation/vim-colors-solarized.git
* * *
## .vimrc Configuration
call plug#begin('~/.vim/bundle')
Plug 'scrooloose/nerdtree'
Plug 'kien/ctrlp.vim'
Plug 'altercation/vim-colors-solarized'
Plug 'thoughtbot/vim-rspec'
call plug#end()
7 set wildignore+=*/tmp/*,*/node_modules/*,*/public/*,*/log/*
8 syntax on
9 set background=dark
10 colorscheme solarized
11 filetype plugin indent on
12 map <F2> :NERDTreeToggle<CR>
13
14 " Leader
15 let mapleader = "\<Space>"
16
17 " Font
18 set guifont=Menlo\Regular:h14
19
20 " Tabs
21 set ts=2 " Tabs are 2 spaces
22 set shiftwidth=2 " Tabs under smart indent
23 set smarttab
24 set expandtab
" Lines and Hightlight cursor
27 set nu
28 set cursorcolumn
29 set cursorline
30
31 " RSpec.vim mappings
32 map <Leader>t :call RunCurrentSpecFile()<CR>
33 map <Leader>s :call RunNearestSpec()<CR>
34 map <Leader>l :call RunLastSpec()<CR>
35 map <Leader>a :call RunAllSpecs()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment