-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvimrc
106 lines (91 loc) · 2.56 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
"""Weird tmux settings
let &t_Co=256
""" Load plugins
call plug#begin('~/.vim/plugged')
Plug 'whatyouhide/vim-gotham'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'Shougo/unite.vim'
Plug 'devjoe/vim-codequery'
Plug 'fatih/vim-go'
call plug#end()
"""" General Settings
"" leader
let mapleader=","
"" vim-airline
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline#extensions#tabline#formatter = 'jsformatter'
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.maxlinenr = ''
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.spell = 'Ꞩ'
let g:airline_symbols.notexists = '∄'
let g:airline_symbols.whitespace = 'Ξ'
let g:airline_theme='jellybeans'
"" vim-codequery
nnoremap <leader>c :CodeQueryMenu Unite Full<CR>
nnoremap <leader>s :CodeQuery Symbol<CR>
nnoremap <leader>l :CodeQuery Call<CR>
nnoremap <leader>r :CodeQuery Caller<CR>
nnoremap <leader>e :CodeQuery Callee<CR>
"" Set default tabs to 2 spaces
set tabstop=2
set shiftwidth=2
set expandtab
"" Stupid backspace setting
set backspace=2
"" Remember location in file
if has("autocmd")
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
endif
"" Line numbers
set number
"" Autoindent
set autoindent
"" Colors
set background=dark
colorscheme gotham256
"" Language/filetype settings
syntax enable
autocmd FileType go setlocal tabstop=2 shiftwidth=2
autocmd FileType py setlocal tabstop=4 shiftwidth=4 expandtab
autocmd FileType yaml setlocal tabstop=2 shiftwidth=2 expandtab
"" Ctags
set path+=;/
set tags+=c_tags;/
set tags+=tags;/
" By default ^W ^] splits horizontal, so now ^] splits vertically
map <C-\> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
"" Window stuff
map <C-h> <C-w>h
map <C-j> <C-w>j
map <C-k> <C-w>k
map <C-l> <C-w>l
"" Buffer Stuff
noremap <leader>d : bd<CR>
noremap <leader>1 : 1b<CR>
noremap <leader>2 : 2b<CR>
noremap <leader>3 : 3b<CR>
noremap <leader>4 : 4b<CR>
noremap <leader>5 : 5b<CR>
noremap <leader>6 : 6b<CR>
noremap <leader>7 : 7b<CR>
noremap <leader>8 : 8b<CR>
noremap <leader>9 : 9b<CR>
noremap <leader>10 : 10b<CR>
"" Scroll stuff
set mouse=a