-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathvimrc
167 lines (141 loc) · 4.4 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
let UseVimplug=1
let PluginsInstalled=0
if UseVimplug == 1
" Bootstrap plugin manager
let vplug=expand('~/.vim/autoload/plug.vim')
if !filereadable(vplug)
echo "Installing vim-plug.."
echo ""
silent !mkdir -p ~/.vim/autoload
silent !git clone --depth=1 https://github.com/junegunn/vim-plug ~/.vim/autoload
endif
" Detect if plugins have been installed
let PluginsInstalled=1
let PluginsDir=expand('~/.vim/plugged')
if !isdirectory(PluginsDir)
echo "Installing plugins.."
let PluginsInstalled=0
endif
endif
if UseVimplug == 1
call plug#begin('~/.vim/plugged')
" My Plugins here:
Plug 'kien/rainbow_parentheses.vim'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
Plug 'gregsexton/gitv'
Plug 'mhinz/vim-signify'
" Plug 'scrooloose/syntastic'
Plug 'w0rp/ale'
Plug 'scrooloose/nerdtree'
Plug 'scrooloose/nerdcommenter'
Plug 'kien/ctrlp.vim'
Plug 'ervandew/supertab'
Plug 'mattn/webapi-vim'
Plug 'mattn/gist-vim'
Plug 'terryma/vim-multiple-cursors'
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
" Plug 'Valloric/YouCompleteMe'
Plug 'vim-scripts/paredit.vim', { 'for': 'clojure' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
Plug 'tpope/vim-classpath', { 'for': 'clojure' }
Plug 'tpope/vim-salve', { 'for': 'clojure' }
Plug 'guns/vim-clojure-static', { 'for': 'clojure' }
Plug 'guns/vim-clojure-highlight', { 'for': 'clojure' }
Plug 'python-mode/python-mode', { 'for': 'python' }
Plug 'chase/vim-ansible-yaml'
Plug 'vim-scripts/verilog_systemverilog.vim'
Plug 'fatih/vim-go'
Plug 'vim-scripts/groovy.vim'
Plug 'tfnico/vim-gradle'
Plug 'mileszs/ack.vim'
Plug 'vim-ruby/vim-ruby'
Plug 'tpope/vim-rails'
Plug 'tpope/vim-bundler'
Plug 'tpope/vim-endwise'
Plug 'mileszs/apidock.vim'
Plug 'voxpupuli/vim-puppet'
Plug 'bling/vim-airline'
Plug 'flazz/vim-colorschemes'
Plug 'nathanaelkane/vim-indent-guides'
call plug#end()
endif
if UseVimplug ==1 && PluginsInstalled == 0
:PlugInstall
let PluginsInstalled=1
endif
" Done bootstrapping plugin manager
" Global settings (regardless of plugins)
filetype plugin indent on
syntax on
set hlsearch
" Custom Leader bindings
let mapleader=","
let maplocalleader="\\"
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" numbers
set number
set numberwidth=4
set nobackup
set history=50 " keep 50 lines of command line history
set ruler " show the cursor position all the time
set showcmd " display incomplete commands
set incsearch " do incremental searching
set tabstop=2
set softtabstop=2
set shiftwidth=2
set expandtab
set smartindent
set statusline=%F%m%r%h%w\
set statusline+=%=
set statusline+=\ [line\ %l\/%L]
set laststatus=2
" case only matters with mixed case expressions
set ignorecase
set smartcase
set nolist
set listchars=eol:¬,extends:»,tab:▸\ ,trail:›
set mouse=a
" Plugin settings
if UseVimplug == 1 && PluginsInstalled == 1
" Add git status to statusline
set statusline=%F%m%r%h%w\
set statusline+=%=
set statusline+=%{fugitive#statusline()}
set statusline+=\ [line\ %l\/%L]
set laststatus=2
" vim-go settings
au Filetype go nnoremap <leader>v :vsp <CR>:exe "GoDef" <CR>
au Filetype go nnoremap <leader>s :sp <CR>:exe "GoDef"<CR>
au Filetype go nnoremap <leader>t :tab split <CR>:exe "GoDef"<CR>
" Rainbow Parentheses settings
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
let g:rbpt_max = 8
" NERDTree
map <Leader>n :NERDTreeToggle<CR>
" Fugitive
map <Leader>gs :Gstatus<CR>
map <Leader>gd :Gdiff<CR>
map <Leader>gc :Gcommit<CR>
map <Leader>gb :Gblame<CR>
map <Leader>gl :Glog<CR>
map <Leader>gp :Git push<CR>
" Colorscheme stuff
set background=dark
colorscheme Chasing_Logic
" Fix background color in kitty terminal
let &t_ut=''
" Make syntastic shut up about asm files
let g:loaded_syntastic_asm_gcc_checker = 1
" PyMode settings
let g:pymode_folding = 0
" This macro increments every number on a line by one. Very useful for
" deploy templates
let @i='yypV:s/\d\+/\=(submatch(0)+1)/ga'
endif