-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
206 lines (164 loc) · 4.21 KB
/
vimrc
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
""" Vundle
""""""""""
set nocompatible
filetype off
" On new machines remember to:
" git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
let mapleader = "\<space>"
let g:mapleader = "\<space>"
""" Language Support
""""""""""""""""""""
" Coffeescript
Bundle 'kchmck/vim-coffee-script'
" Handlebars
Bundle 'nono/vim-handlebars'
" Haml
Bundle 'tpope/vim-haml'
" Slim
Bundle 'bbommarito/vim-slim'
" Javascript (works for semicolonless js)
Bundle 'jiangmiao/simple-javascript-indenter'
let g:SimpleJsIndenter_BriefMode = 1
" Slim
Bundle 'bbommarito/vim-slim'
""" Functionality
"""""""""""""""""
" Rainbow Parentheses
Bundle 'kien/rainbow_parentheses.vim'
let g:rbpt_max = 5
nmap <leader>{ :RainbowParenthesesToggleAll<cr>
" Unimpaired
Bundle 'tpope/vim-unimpaired'
" TComment
Bundle 'tomtom/tcomment_vim'
" Surround
Bundle 'tpope/vim-surround'
" Ragtag
Bundle 'tpope/vim-ragtag'
" Fugitive
Bundle 'tpope/vim-fugitive'
" Solarized
Bundle 'altercation/vim-colors-solarized'
syntax enable
set background=dark
colo solarized
" SnipMate
Bundle 'jarednorman/snipmate.vim'
" L9
Bundle 'L9'
" CtrlP
Bundle 'kien/ctrlp.vim'
let g:ctrlp_working_path_mode = '' " Stop messing with the path
let g:ctrlp_match_window_bottom = 0 " Show at top of window
let g:ctrlp_mru_files = 1 " Enable Most Recently Used files feature
let g:ctrlp_jump_to_buffer = 2 " Jump to tab AND buffer if already open
nmap <leader><leader> :CtrlP<cr>
nmap <leader>t :CtrlPTag<cr>
nmap <leader>b :CtrlPBuffer<cr>
" Powerline
Bundle 'Lokaltog/vim-powerline'
set laststatus=2
let g:Powerline_colorscheme="skwp"
" Syntastic
Bundle 'scrooloose/syntastic.git'
let g:syntastic_javascript_jshint_conf = "~/.jshint.config"
""" Basic Settings
""""""""""""""""""
filetype plugin indent on
set ttyfast
set ttyscroll=3
set lazyredraw
set noswapfile
set showtabline=2
set backspace=indent,eol,start
set nobackup
set autoindent
set expandtab
set noerrorbells visualbell t_vb=
autocmd GUIEnter * set visualbell t_vb=
set incsearch
set foldmethod=manual
set cursorline
set cmdheight=2
set showcmd
set winwidth=80
set winheight=5
set winminheight=5
set winheight=999
set relativenumber
set list listchars=tab:»·,trail:·
set tabstop=4
set shiftwidth=4
set softtabstop=4
""" Filetype Specific stuff
"""""""""""""""""""""""""""
" Rainbow Parens Always
autocmd VimEnter * RainbowParenthesesToggle
autocmd Syntax * RainbowParenthesesLoadRound
autocmd Syntax * RainbowParenthesesLoadSquare
autocmd Syntax * RainbowParenthesesLoadBraces
" Coffee
autocmd FileType coffee set tabstop=4
autocmd FileType coffee set shiftwidth=4
autocmd FileType coffee set softtabstop=4
" Lua
autocmd FileType lua set tabstop=2
autocmd FileType lua set shiftwidth=2
autocmd FileType lua set softtabstop=2
" Ruby
autocmd FileType ruby set tabstop=2
autocmd FileType ruby set shiftwidth=2
autocmd FileType ruby set softtabstop=2
" Sass
autocmd FileType scss set tabstop=2
autocmd FileType scss set shiftwidth=2
autocmd FileType scss set softtabstop=2
autocmd FileType sass set tabstop=2
autocmd FileType sass set shiftwidth=2
autocmd FileType sass set softtabstop=2
" CSS
autocmd FileType css set tabstop=2
autocmd FileType css set shiftwidth=2
autocmd FileType css set softtabstop=2
" HTML
autocmd FileType html set tabstop=2
autocmd FileType html set shiftwidth=2
autocmd FileType html set softtabstop=2
""" EVERTHING FASTER
""""""""""""""""""""
nmap <cr> :
nmap <leader>1234567890 :wq<cr>
nmap K \<noop>
nmap <c-j> j<c-e>
nmap <c-k> k<c-y>
nmap <c-h> :tabp<cr>
nmap <c-l> :tabn<cr>
""" LEADER LEADER
"""""""""""""""""
nmap <leader>w :w!<cr>
nmap <leader>d :bd<cr>
nmap <leader>. <C-^>
nmap <leader>y "*p
nmap <leader><tab> <c-w><c-w>
nmap <leader>c :w<cr>:!cat % \| pbcopy<cr>
nmap <leader>v "*p
nmap <leader>g :!curl -OL <c-r>"<cr>
map <leader>mt :map <lt>leader>t :w<lt>cr>
map <leader>mr :map <lt>leader>r :w<lt>cr>
map <leader>h <C-w>h
map <leader>j <C-w>j
map <leader>k <C-w>k
map <leader>l <C-w>l
""" Quick settings
""""""""""""""""""
nmap <leader>qw :set nowrap! <CR>
nmap <leader>qh :set hlsearch! <CR>
""" Welcome to Hell
"""""""""""""""""""
map <Up> :echo "NO!"<cr>
map <Down> :echo "NO!"<cr>
map <Left> :echo "NO!"<cr>
map <Right> :echo "NO!"<cr>