-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
167 lines (135 loc) · 3.63 KB
/
vimrc
File metadata and controls
167 lines (135 loc) · 3.63 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
" jellybeans
syntax enable
colorscheme jellybeans
set nocp
set mouse=a
set splitright
set number
set rtp+=/usr/local/opt/fzf
set backspace=indent,eol,start
set expandtab
set cursorline
set incsearch
set ignorecase
set smartcase
set cindent
set clipboard=unnamed
set statusline+=%F
set re=1
set noswapfile
set shiftwidth=2
set tabstop=2
cnoremap %% <C-R>=expand('%:h').'/'<cr>
hi Search guibg=LightBlue
filetype plugin on
syntax on
autocmd BufWritePre * :%s/\s\+$//e
let mapleader = " "
" indenting
set ai " Automatically set the indent of a new line (local to buffer)
set si " smartindent (local to buffer)
set pastetoggle=<f3>
nmap U <c-r>
nmap Y y$
" treat wraps as lines
nmap k gk
nmap j gj
" tabs
noremap <S-l> gt
noremap <S-h> gT
noremap <S-t> :tabnew<cr>
noremap <S-q> :tabc<cr>
" search
nnoremap <leader>f :Ag<cr>
nnoremap <leader>p :Files<cr>
nnoremap <leader>t :Tags<cr>
" splits
nnoremap <leader>v :vsp<cr>
nnoremap <leader>s :sp<cr>
nnoremap <leader>q :q<cr>
nnoremap <leader>w :w<cr>
nnoremap <leader>, <C-^>
nnoremap <leader>ra :%s/
nnoremap - <c-w>20<
nnoremap = <c-w>20>
nnoremap <leader>[ <c-T>
nnoremap <leader>] <c-]>
nnoremap <leader>o <c-o>
nnoremap <CR> o<Esc>
" Turn off gitgutter key mappings
let g:git8gutter_map_keys = 0
let g:javascript_plugin_jsdoc = 1
let g:javascript_plugin_ngdoc = 1
" Magic sauce that makes nerdtree perform like a typical explorer
" Open fil[Ma9es as normal in NerdTree with 'o' or Enter and a persistent
" NerdTree instance remains, press <leader>d to re-open
let NERDTreeQuitOnOpen = 0
nnoremap <Lead[Ma9es9er>d :let NERDTreeQuitOnOpen = 1<bar>:NERDTreeToggle<CR>
nnoremap <Leader>d :let NERDTreeQuitOnOpen = 0<bar>:NERDTreeToggle<CR>
let g:ctrlp_show_hidden = 1
let NERDTreeShowHidden=1
let g:ag_working_path_mode="r"
" Start interactive EasyAlign in visual mode (e.g. vipga)
xmap ga <Plug>(EasyAlign)
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
nmap ga <Plug>(EasyAlign)
"Stuff required by rubyblock
runtime macros/matchit.vim
"Plugins
call plug#begin('~/.vim/plugged')
" Colors
Plug 'nanotech/jellybeans.vim', { 'tag': 'v1.6' }
Plug 'altercation/vim-colors-solarized'
Plug 'tomasr/molokai'
" -- Git -
Plug 'tpope/vim-fugitive'
Plug 'bling/vim-airline'
" Util
Plug 'junegunn/vim-easy-align'
Plug 'Konfekt/FastFold' " Update folds on save
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'othree/html5.vim'
Plug 'alvan/vim-closetag'
Plug 'tpope/vim-surround'
Plug 'itchyny/lightline.vim' " Status bar
Plug 'sjl/gundo.vim'
Plug 'danro/rename.vim'
Plug 'majutsushi/tagbar'
Plug 'scrooloose/nerdTree'
Plug 'sickill/vim-monokai'
Plug 'nono/vim-handlebars', { 'for': 'handlebars.html' }
Plug 'Shougo/vimproc', { 'do': 'make' }
Plug 'tpope/vim-haml'
Plug 'posva/vim-vue'
Plug 'dbakker/vim-projectroot'
Plug 'honza/vim-snippets'
Plug 'christoomey/vim-tmux-navigator'
Plug 'airblade/vim-gitgutter'
Plug 'benekastah/neomake'
Plug 'janko-m/vim-test'
Plug 'valloric/youcompleteme'
Plug 'tpope/vim-repeat'
" Elixir
Plug 'elixir-lang/vim-elixir'
" Go
Plug 'fatih/vim-go', { 'for': 'go' }
Plug 'rhysd/vim-go-impl', { 'for': 'go' }
" Javascript
Plug 'kchmck/vim-coffee-script', { 'for': 'coffee' }
Plug 'isruslan/vim-es6'
Plug 'pangloss/vim-javascript'
Plug 'tpope/vim-jdaddy'
" Ruby
Plug 'Keithbsmiley/rspec.vim'
Plug 'tpope/vim-rails'
Plug 'thoughtbot/vim-rspec'
Plug 'vim-ruby/vim-ruby'
Plug 'sunaku/vim-ruby-minitest'
Plug 't9md/vim-ruby-xmpfilter'
Plug 'slim-template/vim-slim'
" Misc
Plug 'kana/vim-textobj-user'
Plug 'tpope/vim-commentary'
Plug 'nelstrom/vim-textobj-rubyblock'
call plug#end()