-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
83 lines (67 loc) · 2.04 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
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
" call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-endwise'
Plugin 'tpope/vim-rails'
Plugin 'tpope/vim-fugitive'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
" Git Gutter prefrences
set updatetime=250
" Airline prefrences
set laststatus=2
set ttimeoutlen=10
" 2 spaces not tabs
set autoindent
set smartindent
set tabstop=2
set shiftwidth=2
set expandtab
" side numbers
set number
" Strip whitespace on save
autocmd BufWritePre * :%s/\s\+$//e
"No arrow keys. :(
inoremap <Up> <NOP>
inoremap <Down> <NOP>
inoremap <Left> <NOP>
inoremap <Right> <NOP>
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" 80 char delimeter
set colorcolumn=80
" Colorscheme
syntax enable
colorscheme monokai
let g:airline_theme='bubblegum'
"No .swp files
set noswapfile
set autoread
" Multiple buffers
set hidden
set runtimepath^=~/.vim/bundle/ag
" fzy
function! FzyCommand(choice_command, vim_command)
try
let output = system(a:choice_command . " | fzy ")
catch /Vim:Interrupt/
" Swallow errors from ^C, allow redraw! below
endtry
redraw!
if v:shell_error == 0 && !empty(output)
exec a:vim_command . ' ' . output
endif
endfunction
nnoremap <C-p> :call FzyCommand("ag . --silent -l -g ''", ":e")<cr>