-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
146 lines (121 loc) · 2.65 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
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
"""""""""""""
" Be iMproved
"""""""""""""
if has('vim_starting')
set nocompatible " Be iMproved
endif
" Install vim-plug
" curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
"
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree'
Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' }
Plug 'tell-k/vim-autopep8'
Plug 'nvie/vim-flake8'
Plug 'vim-scripts/nginx.vim'
Plug 'tpope/vim-markdown'
Plug 'ingydotnet/yaml-vim'
Plug 'Shougo/unite.vim'
Plug 'bling/vim-airline'
Plug 'elzr/vim-json'
Plug 'apriendeau/pencil'
Plug 'apriendeau/vim-colorline'
Plug 'jiangmiao/auto-pairs'
Plug 'maralla/completor.vim'
Plug 'leafgarland/typescript-vim'
Plug 'w0rp/ale'
" Required:
call plug#end()
" Required:
filetype plugin indent on
""""""""""""""""
" Basic Settings
""""""""""""""""
set background=dark
set clipboard=unnamed
set mouse=a
set tabstop=4
set shiftwidth=0
set laststatus=2
set backspace=indent,eol,start
let g:autoclose_on = 0
""""""""""""""""
" Theme Settings
""""""""""""""""
let g:airline_theme='colorline'
let g:airline_powerline_fonts = 1
set colorcolumn=120
syntax on
color pencil
set number
set relativenumber
set splitright
""""""""""
" Leader
""""""""""
let mapleader="\\"
set guicursor+=i:blinkwait10
""""""""""""
" python
""""""""""""
au FileType python set tabstop=4
\ | set softtabstop=4
\ | set shiftwidth=4
\ | set textwidth=119
\ | set expandtab
\ | set autoindent
\ | set fileformat=unix
let g:autopep8_max_line_length=119
let g:completor_gocode_binary = "/root/gopath/go1.8.3/bin/gocode"
"""""""""""""
" markdown
"""""""""""""
autocmd BufNewFile,BufReadPost *.md set filetype=markdown
let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'go']
" Turn off Matching paren highlighting because its annoying.
let loaded_matchparen = 0
""""""""""""""""""
" Vertical splits
""""""""""""""""""
noremap <Leader>v :vsp<CR>
noremap <Leader>h :sp<CR>
""""""""""""
" Split Nav
""""""""""""
nmap <C-k> :wincmd k<CR>
nmap <C-j> :wincmd j<CR>
nmap <C-h> :wincmd h<CR>
nmap <C-l> :wincmd l<CR>
nnoremap <C-S-Right> <esc>$
nnoremap <C-S-Left> <esc>^
nnoremap <Leader>/ <C-_>
map <Leader><cc> <C-_><C-_>
"""""
"tabs
"""""
map <C-1> 1gt
map <C-2> 2gt
map <C-3> 3gt
map <C-4> 4gt
map <C-5> 5gt
map <C-6> 6gt
map <C-7> 7gt
map <C-8> 8gt
map <C-9> 9gt
map <C-0> :tablast<CR>
nnoremap <C-t> :tabnew<CR>
inoremap <C-t> <Esc>:tabnew<CR>
"""""""""""""""""""""""
" better mouse support
"""""""""""""""""""""""
if has("mouse_sgr")
set ttymouse=sgr
else
set ttymouse=xterm2
end
""""""""""""""""
" External files
""""""""""""""""
for f in split(glob('~/.vim/vim_*'), '\n')
execute 'source' f
endfor