forked from ryyppy/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
155 lines (125 loc) · 3.72 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
set nocompatible
filetype off
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Require Vundle to manage itself
Bundle 'gmarik/vundle'
" Load Bundles
" Bundle 'yonchu/accelerated-smooth-scroll'
Bundle 'vim-ruby/vim-ruby'
Bundle 'scrooloose/nerdtree'
Bundle 'moll/vim-node'
Bundle 'scrooloose/syntastic'
Bundle 'majutsushi/tagbar'
" Bundle 'marijnh/tern_for_vim'
Bundle 'tmhedberg/matchit'
Bundle 'SirVer/ultisnips'
Bundle 'tpope/vim-fugitive'
Bundle 'pangloss/vim-javascript'
Bundle 'elzr/vim-json'
Bundle 'tpope/vim-surround'
Bundle 'mustache/vim-mustache-handlebars'
Bundle 'lukaszb/vim-web-indent'
Bundle 'Valloric/MatchTagAlways'
Bundle 'tmhedberg/matchit'
Bundle 'ryyppy/nerdcommenter'
Bundle 'groenewege/vim-less'
Bundle 'duff/vim-bufonly'
Bundle 'mxw/vim-jsx'
Bundle 'bling/vim-airline'
Bundle 'kchmck/vim-coffee-script'
Bundle 'lambdatoast/elm.vim'
Bundle 'facebook/vim-flow'
Bundle 'mephux/bro.vim'
" YouCompleteMe
if has('python')
if v:version >= '704'
Bundle 'Valloric/YouCompleteMe'
"Bundle 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
endif
endif
set encoding=utf-8
set noet ai cin bs=2 cb=unnamed
set number ruler nowrap autoread showcmd showmode fdm=marker
" Disable the creation of backup files (those with ~)
set nobackup nowritebackup
" Fix the tabbing system
set tabstop=2 shiftwidth=2 expandtab
set autoindent smartindent nocindent indentexpr=
set hlsearch
set splitright
" Tabbing for specific filetypes
au FileType coffee setl sw=2 sts=2 et
au FileType elm setl sw=2 sts=2 et
" Specific tabbing for languages
autocmd Filetype javascript set tabstop=2 shiftwidth=2 expandtab
"Enable the neat filetype and syntax sugar
filetype on
filetype plugin on
filetype plugin indent on
syntax on
" Enable javascript highlighting for flowtype
au BufNewFile,BufRead *.flow set filetype=javascript
" Powerline
set laststatus=2
set noshowmode
"Set color scheme
set background=dark
"let g:solarized_termcolors=256
"colorscheme solarized
colorscheme grb256
set t_Co=256
" Keymappings
nmap <S-Enter> O<Esc>
nmap <CR> o<Esc>
" Opening and closing braces
imap <C-F> {<CR>}<C-O>O
" Puts a literal ^I (literal tab character)
:inoremap <S-Tab> <C-V><Tab>
" Git-Commit formatting
autocmd Filetype gitcommit setlocal wrap spell textwidth=72
" MD formatting
autocmd BufNewFile,BufRead *.md set filetype=markdown
autocmd Filetype markdown setlocal wrap textwidth=80
" Ultisnip
let g:UltiSnipsSnippetDirectories=["UltiSnips"]
let g:UltiSnipsExpandTrigger="<c-k>"
let g:UltiSnipsJumpForwardTrigger="<c-k>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:UltiSnipsEditSplit="vertical"
" Tagbar
let g:tagbar_type_javascript = { 'ctagsbin' : 'jsctags' }
" vim-json
let g:vim_json_syntax_conceal=0
" NERDtree
let g:NERDTreeDirArrows=0 " fixes weird characters as list arrows
" Mustache-Handlebar
let g:mustache_abbreviations = 1
" Syntastic Configuration
let g:syntastic_check_on_open=1
let g:syntastic_check_on_wq=0 " don't check on :wq and :x
let g:syntastic_enable_signs=1 " errors on left side
let syntastic_mode_map = { 'passive_filetypes': ['html'] }
let g:syntastic_less_use_less_lint = 0
" You Complete Me Configuration
let g:ycm_autoclose_preview_window_after_completion=1
"if executable('jshint')
"let g:syntastic_javascript_checkers=['jshint']
"endif
"
if executable('eslint')
let g:syntastic_javascript_checkers=['eslint']
endif
""""""""""""""""""""
" Flowtype config
""""""""""""""""""""
let g:flow#autoclose = 1
"Use locally installed flow
let local_flow = finddir('node_modules', '.;') . '/.bin/flow'
if matchstr(local_flow, "^\/\\w") == ''
let local_flow= getcwd() . "/" . local_flow
endif
if executable(local_flow)
let g:flow#flowpath = local_flow
endif