-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.vimrc
More file actions
152 lines (127 loc) · 3.78 KB
/
.vimrc
File metadata and controls
152 lines (127 loc) · 3.78 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
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
set nocompatible " be iMproved
filetype off " required!
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle
" required!
Plugin 'gmarik/Vundle.vim'
" My Plugins here:
" Rails
Plugin 'tpope/vim-rails'
" Gemfile syntax
Plugin 'hron84/Gemfile.vim'
" Minifbuffer at top
" Plugin 'minibufexpl.vim'
" Rdoc syntax highltight
Plugin 'RDoc'
" Wordpress plugin
" Plugin 'blogit.vim'
" Command-T like plugin
Plugin 'ctrlp.vim'
" Ack for search
Plugin 'ack.vim'
" Syntax for nginx config files
Plugin 'nginx.vim'
" Syntax for coffe script
Plugin 'kchmck/vim-coffee-script'
" Syntax for jade
Plugin 'jade.vim'
" Surroudings
Plugin 'surround.vim'
" grep.vim
Plugin 'grep.vim'
" less.vim
Plugin 'groenewege/vim-less'
" wisely add end in ruby
Plugin 'endwise.vim'
" Golang
Plugin 'fatih/vim-go'
" Haml
Plugin 'tpope/vim-haml'
" Emblem
Plugin 'heartsentwined/vim-emblem'
" Mustache Handlebars
Plugin 'mustache/vim-mustache-handlebars'
" Javascript formatting
Plugin 'maksimr/vim-jsbeautify'
" CSS colors
Plugin 'ap/vim-css-color'
" Vue
Plugin 'leafOfTree/vim-vue-plugin'
call vundle#end() " required
filetype plugin indent on " required!
"
" Brief help
" :PluginList - list configured bundles
" :PluginInstall(!) - install(update) bundles
" :PluginSearch(!) foo - search(or refresh cache first) for foo
" :PluginClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Plugin command are not allowed..
set ruler " Ruler on
set nu " Line numbers on
set nowrap " Line wrapping off
set timeoutlen=250 " Time to wait after ESC (default causes an annoying delay)
set term=xterm-256color
set ts=2 " Tabs are 2 spaces
set bs=2 " Backspace over everything in insert mode
set tabstop=2 shiftwidth=2 " Tabs under smart indent
set expandtab " use spaces, not tabs
set smarttab
set showmatch " Show matching brackets.
set mat=5 " Bracket blinking.
set novisualbell " No blinking .
set noerrorbells " No noise.
set laststatus=2 " Always show status line.
set nocp incsearch
set cinoptions=:0,p0,t0
set cinwords=if,else,while,do,for,switch,case
set formatoptions=tcqr
set cindent
set autoindent
set clipboard=unnamed " Nice copy pasting
set hlsearch " highlighting
:nnoremap <CR> :nohlsearch<cr> " clear the search buffer when hitting return
syntax on " Colors in OSX
" TEX files set wrap
:autocmd BufNewFile,BufRead *.tex set wrap
" HTML files set wrap
:autocmd BufNewFile,BufRead *.html set wrap
" TXT files set wrap
:autocmd BufNewFile,BufRead *.txt set wrap
let g:ctrlp_map = '<c-t>'
" Json syntax
autocmd BufNewFile,BufRead *.json set ft=javascript
" autosave and return to normal mode
autocmd FocusLost * :silent! wall
autocmd FocusLost * call feedkeys("\<C-\>\<C-n>")
" Autocorections
iab Factroy Factory
iab descrbie describe
iab Documass Documas
iab defintion definition
iab Defintion Definition
iab destory destroy
" Go lang
filetype plugin indent off
set runtimepath+=/usr/local/go/misc/vim
filetype plugin indent on
syntax on
au BufRead,BufNewFile *.go set filetype=go
au BufRead,BufNewFile *.hamlbars set filetype=haml
au BufRead,BufNewFile *.txt set wrap
au BufRead,BufNewFile *.tex set wrap
" Format JS
autocmd FileType javascript noremap <buffer> <c-f> :call RangeJsBeautify()<cr>
" Open netrw preview in vertical split
let g:netrw_preview = 1
" Press F5 inside i, and paste code with comments
set pastetoggle=<f5>
" k and j works in wrap mode
nnoremap k gk
nnoremap j gj
" Ag for ACK
if executable('ag')
let g:ackprg = 'ag --vimgrep'
endif