-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
187 lines (159 loc) · 4.99 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
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
set background=dark
colors railscasts
set nocompatible
" let Vundle manage Vundle
" ==========================================================
" Bundles
" ==========================================================
"
Bundle 'gmarik/vundle'
Bundle 'kien/ctrlp.vim'
Bundle 'scrooloose/nerdtree'
Bundle 'derekwyatt/vim-scala'
Bundle 'tpope/vim-surround'
Bundle 'mileszs/ack.vim'
Bundle 'mattn/zencoding-vim'
Bundle 'tpope/vim-surround'
Bundle 'git://git.code.sf.net/p/vim-latex/vim-latex'
Bundle 'vim-ruby/vim-ruby'
Bundle 'altercation/vim-colors-solarized'
Bundle 'kchmck/vim-coffee-script'
Bundle 'SirVer/ultisnips'
Bundle 'ervandew/supertab'
Bundle 'scrooloose/syntastic'
Bundle 'Valloric/YouCompleteMe'
Bundle 'jelera/vim-javascript-syntax'
Bundle 'vim-scripts/VimClojure'
Bundle 'toyamarinyon/vim-swift'
Bundle 'fatih/vim-go'
" Python
"
Bundle 'davidhalter/jedi-vim'
Bundle 'pydoc.vim'
Bundle 'https://github.com/fs111/pydoc.vim'
filetype plugin indent on " required!
" ...
" ZenCoding
let g:user_zen_expandabbr_key = '<c-e>'
let g:use_zen_complete_tag = 1
set number
colors base16-railscasts
" Vim airline
let g:airline_powerline_fonts = 1
" ==========================================================
" MacVim
" ==========================================================
"
if has("gui_running")
set guioptions=egmrt
"set guifont=Monaco:h10
set guifont=Menlo:h12
set showtabline=0
set guioptions-=r
macmenu File.New\ Tab key=<D-T>
" macmenu File.Open\ Tab\.\.\. key=<nop>
nnoremap <D-e> :tabnew<cr>
nnoremap <D-t> :CtrlP<cr>
nnoremap <D-d> :vsp <cr>
nnoremap <D-D> :split <cr>
nnoremap <C-r> :ClearCtrlPCache <cr>
" colors solarized
colors base16-railscasts
endif
" ==========================================================
" Indentation
" ==========================================================
"
set smartindent
set autoindent
" Make tabs as wide as two spaces
set tabstop=4
" call pathogen#infect()
set runtimepath^=~/.vim/bundle/ctrlp.vim
" Make tabs spaces
set shiftwidth=4
" REAL make tabs spaces
set expandtab
" allows clipboard copy and pasted with vim commands
set clipboard=unnamed
au FileType python setl sw=4 sts=4 et
au FileType ruby setl sw=2 sts=2 et
au FileType yaml setl sw=2 ts=2 et
au FileType javascript setl sw=2 sts=2 et
au FileType html setl sw=2 sts=2 et
au FileType scss setl sw=2 sts=2 et
au FileType coffee setl sw=2 sts=2 et
au FileType maude setl sw=2 sts=2 et
let python_highlight_all = 1
set hlsearch
map <D-r> :w\|!ruby %<cr>
map <C-b> :w\|!bundle install<cr>
map <C-t> :vsp\|:CtrlP <cr>
map <D-t> :CtrlP <cr>
map <D-k> :NERDTreeToggle <cr>
map <D-j> <C-W>w
map <F9> :call Tex_RunLaTeX() <cr>
"
" ==========================================================
" Keybinding for terminal vim
" ==========================================================
"
map <C-e> :vsp <cr>
map <C-k> :NERDTreeToggle <cr>
map <C-t> :CtrlP <cr>
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:UltiSnipsExpandTrigger="<c-t>"
"let g:UltiSnipsJumpForwardTrigger="<c-n>"
"
" ==========================================================
" FileType
" ==========================================================
"
au BufRead,BufNewFile *.hamlc set ft=haml
au BufRead,BufNewFile *.mobile.erb set filetype=html.eruby.javascript.javascript-jquery
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery
au BufRead,BufNewFile *.js set ft=javascript syntax=jquery
au BufRead,BufNewFile *.html set ft=html
au BufRead,BufNewFile *.html set ft=htmljinja.html
au BufRead,BufNewFile *.html set ft=ejs.html
au BufRead,BufNewFile *.maude set ft=maude
"
" ==========================================================
" FileType
" ==========================================================
syntax enable
set t_Co=256
let g:solarized_termcolors=256
let g:solarized_contrast="high"
"colors base16-solarized
"colors solarized
"colors Tomorrow-Night-Eighties
"
" ==========================================================
" LaTeX stuff
" ==========================================================
"
"
" au BufWritePost *.tex silent call Tex_RunLaTeX()
" au BufWritePost *.tex silent !pkill -USR1 xdvi.bin
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on
" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash
" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*
" OPTIONAL: This enables automatic indentation as you type.
filetype indent on
" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'
highlight LineNr ctermbg=235