Repository navigation
Expand file tree
/
Copy pathdotvimrc
More file actions
73 lines (56 loc) · 1.55 KB
/
Copy pathdotvimrc
File metadata and controls
73 lines (56 loc) · 1.55 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
set encoding=utf-8
call pathogen#infect()
call pathogen#helptags()
syntax on
filetype plugin indent on
set background=dark
colorscheme solarized
" Windows customizations - set font to Consolas and maximize the window, since
" GVim doesn't remember window size.
if has("win32")
set gfn=Consolas:h10:cANSI
set lines=1000 columns=1000
endif
" Set tab width to 2
set ts=2
set sts=2
set sw=2
set smartindent
" Make backspace work correctly in insert mode on Windows
set backspace=indent,eol,start
" Enable various UI elements
set number
set showcmd
set ruler
" Change mapleader to , and remap , to \ (the default map leader)
let mapleader=','
noremap \ ,
" Mapping and character customization for showing invisible characters
nmap <leader>l :set list!<CR>
set listchars=tab:▸\ ,eol:¬
" Various convenience mappings
nmap <leader>h :set hls!<CR>
nmap <leader>, :CtrlP<CR>
" Convenience mappings for vim-rails
nmap ,rv :Rview
nmap ,rm :Rmodel
nmap ,rc :Rcontroller
nmap ,ra :A<CR>
" Enable carriage return and space expansion for delimitMate
let delimitMate_expand_cr = 1
let delimitMate_expand_space = 1
" Enable matchit
runtime macros/matchit.vim
" Automatically source .vimrc after saving when we're editing it
if has("autocmd")
autocmd! BufWritePost .vimrc source $MYVIMRC
endif
" Disable F1 for help in MacVim
map <F1> <nop>
" Disable all bells
set noeb vb t_vb=
autocmd GUIENTER * set vb t_vb=
nnoremap <leader>9 :RainbowParenthesesToggle<CR>
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces