-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
99 lines (76 loc) · 2.47 KB
/
Copy pathvimrc
File metadata and controls
99 lines (76 loc) · 2.47 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
source ~/.vim/bundle.vim
set nocompatible
set t_Co=256
syntax on
colorscheme Tomorrow-Night-Eighties
set expandtab
set history=1000
set incsearch
set iskeyword+=-
set laststatus=2
set nobackup " don't want no backup files
set noerrorbells
set nojoinspaces
set noswapfile " no swap files
set nowritebackup " don't make a backup before overwriting a file
set number
set scrolloff=3 " Start scrolling three lines before horizontal border of window
set shell=/bin/zsh
set shiftwidth=2
set smartindent
set smarttab
set softtabstop=2
set synmaxcol=200
set tabstop=2
command Greview :Git! diff --staged
" Airline
let g:airline_theme = 'base16'
" Syntastic options
let g:syntastic_mode_map = { 'mode': 'active' }
let g:syntastic_ruby_checkers = ['mri', 'rubocop']
let g:syntastic_cucumber_cucumber_args="--profile syntastic"
let g:syntastic_warning_symbol = "⚠"
let g:syntastic_javascript_checkers = ['eslint']
" Version of ruby
let g:syntastic_ruby_exec = '~/.rbenv/shims/ruby'
" Ack / Grep / CtrlP
set grepprg="ag --nocolor --nogroup --column"
let g:ag_prg="ag --nocolor --nogroup --column --ignore=tags"
let g:ctrlp_user_command='ag %s -l --nocolor -g ""'
let g:ctrlp_use_caching=0
" Syntastic options
" let g:syntastic_check_on_open=1
" Ctags
let g:Tlist_Ctags_Cmd="ctags --exclude='*.js'"
" Display extra whitespace
scriptencoding utf-8
set encoding=utf-8
set list listchars=tab:»·,trail:.
" NERDTree
let g:NERDTreeDirArrows=0
let g:NERDTreeQuitOnOpen=0
" git commit settings
autocmd Filetype gitcommit setlocal spell textwidth=72
au BufNewFile,BufRead *.es6 set filetype=javascript
au BufNewFile,BufRead *.exs set filetype=elixir
" highlight debugging
au BufEnter *.rb syn match error contained "\<binding.pry\>"
au BufEnter *.js syn match error contained "\<debugger\>"
" CtrlP settings
" make enter auto open in new tab
let g:ctrlp_prompt_mappings = {
\ 'AcceptSelection("e")': ['<S-cr>'],
\ 'AcceptSelection("t")': ['<cr>', '<2-LeftMouse>'],
\ 'AcceptSelection("h")': ['<c-x>', '<c-cr>', '<c-s>'],
\ 'AcceptSelection("v")': ['<c-v>', '<RightMouse>'],
\ }
let g:ctrlp_custom_ignore = { 'dir': '\v[\/](node_modules)|(\.(git|hg|svn))$', 'file': '\v\.(exe|so|dll|DS_STORE)$' }
" vim-rspec
let g:rspec_runner = "os_x_iterm2"
" let g:rspec_command = "!rspec --drb {spec}"
autocmd FileType ruby,eruby
\ set foldmethod=expr |
\ set foldexpr=getline(v:lnum)=~'^\\s*#'
" rust
let g:rustfmt_autosave = 1
source ~/.vim/mappings.vim