/
.vimrc
90 lines (70 loc) · 1.71 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
set nocompatible
" space leader master race?
let mapleader = " "
call pathogen#infect()
set t_Co=256
set background=dark
syntax on
colorscheme solarized
filetype plugin indent on
" reload files changed outside vim automatically (switching branches, etc)
set autoread
set backspace=2
set cursorline
set nobackup
set noerrorbells
set noswapfile
set novisualbell
set nowritebackup
set nu
set smartcase
set splitbelow
set splitright
set title
" why oh why would anyone want these?
if exists('+ballooneval')
set noballooneval
endif
let g:netrw_nobeval=1
" always show the statusline
set laststatus=2
" generic indentation
set expandtab
set tabstop=2
set shiftwidth=2
set nowrap
set textwidth=80
set colorcolumn=+1
set formatoptions=tcqrol
" markdown specific
au BufRead,BufNewFile *.md,*.markdown setlocal textwidth=80 wrap filetype=markdown
" display extra whitespace
set list listchars=tab:»·,trail:·
" the silver searcher
if executable('ag')
" use ag instead of grep
set grepprg=ag\ --nogroup\ --nocolor
" use ag in ctrlp for listing files. will respect .gitignore by default
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
endif
" saner ctrlp buffer behaviour
let g:ctrlp_switch_buffer = 'et'
" navigate splits with <c-hjkl>
nnoremap <c-j> <c-w>j
nnoremap <c-k> <c-w>k
nnoremap <c-h> <c-w>h
nnoremap <c-l> <c-w>l
" yeah, why not
nnoremap <Left> :echoe "omg use h"<CR>
nnoremap <Right> :echoe "omg use l"<CR>
nnoremap <Up> :echoe "omg use k"<CR>
nnoremap <Down> :echoe "omg use j"<CR>
" unmap F1 so I stop opening help all the damn time
nmap <F1> <nop>
imap <F1> <nop>
if has("gui_running")
set guioptions=-t
set guifont=Menlo\ for\ Powerline:h14
endif
" use powerline symbols
let g:airline_powerline_fonts = 1