-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc.local
59 lines (48 loc) · 1.88 KB
/
vimrc.local
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
colorscheme cobalt2 " Colorscheme cobal2
" Use Vim settings, rather then Vi settings. This setting must be as early as
" possible, as it has side effects.
set nocompatible
" Enable matching/closing types when using %
runtime macros/matchit.vim
" Remove trailing spaces
autocmd BufWritePre * :%s/\s\+$//e
" Set font size & type
set guifont=Monaco:h12
" Leader
let mapleader = " "
set backspace=2 " Backspace deletes like most programs in insert mode
set nobackup
set nowritebackup
set noswapfile " http://robots.thoughtbot.com/post/18739402579/global-gitignore#comment-458413287
set history=50
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set laststatus=2 " Always display the status line
set autowrite " Automatically :write before running commands
set guioptions-=r " remove right-hand scroll bar
set guioptions-=L " remove left-hand scroll bar
set relativenumber " Set relative line numbering
set hlsearch " Highlight all matches after entering a search pattern
set ignorecase " Case insensitive pattern matching
set smartcase " Overrides ignorecare if pattern contains upcase
set tags=./tags " Set the tag file order
" Make it obvious where 80 characters is
set textwidth=80
set colorcolumn=+1
" Automatically rebalance windows on vim resize
autocmd VimResized * :wincmd =
" Get off my lawn
nnoremap <Left> :echoe "Use h"<CR>
nnoremap <Right> :echoe "Use l"<CR>
nnoremap <Up> :echoe "Use k"<CR>
nnoremap <Down> :echoe "Use j"<CR>
" zoom a vim pane, <C-w>= te re-balance
nnoremap <leader>= :wincmd =<cr>
" Load on startup
let g:NERDTreeWinPos = "right"
" Vim rspec
let g:rspec_command = 'call Send_to_Tmux("bundle exec rspec {spec}\n")'
let g:jsx_ext_required = 0 " Allow JSX in normal JS files
" Open NERDTREE with Ctrl + n
map <C-n> :NERDTreeToggle<CR>