-
Notifications
You must be signed in to change notification settings - Fork 1
/
.vimrc
139 lines (112 loc) · 3.01 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
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()
"Plugins
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'scrooloose/nerdcommenter'
Plugin 'mattn/emmet-vim'
Plugin 'tpope/vim-surround'
Plugin 'pangloss/vim-javascript'
Plugin 'klen/python-mode'
Plugin 'octol/vim-cpp-enhanced-highlight'
Plugin 'fatih/vim-go'
Plugin 'wlangstroth/vim-racket'
Plugin 'jiangmiao/auto-pairs'
Plugin 'vim-ruby/vim-ruby'
Plugin 'leafgarland/typescript-vim'
Plugin 'justinmk/vim-syntax-extra'
Plugin 'conormcd/matchindent.vim'
Plugin 'sickill/vim-monokai'
Plugin 'christoomey/vim-tmux-navigator'
Plugin 'pboettch/vim-cmake-syntax'
Plugin 'jhand2/vim-csharp'
Plugin 'will133/vim-dirdiff'
Plugin 'PProvost/vim-ps1'
call vundle#end()
filetype on
autocmd FileType ruby set re=1 "Fixes syntax highlighting lag in ruby
" Markdown
let g:markdown_enable_spell_checking = 0
" ctags
set tags=tags;/,pytags;/
" Golang highlighting
let g:go_fmt_command = "goimports"
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:cpp_class_scope_highlight = 1
" NERDTree
let NERDTreeQuitOnOpen=1
map <C-n> :NERDTreeToggle<CR>
" Powerline
set laststatus=2
" Python mode config
let g:pymode_rope = 0 "Turn off rope
let g:pymode_python='python3'
let g:pymode_syntax=1
let g:pymode_options_colorcolumn = 0
let g:pymode_indent = 1
let g:pymode_doc = 0
set completeopt=menu
let g:pymode_lint_checkers = []
" Standard config
setlocal shiftwidth=4
setlocal softtabstop=4
setlocal tabstop=4
set expandtab
filetype indent on
let mapleader=","
imap jk <Esc>
" Use system clipboard
set clipboard=unnamedplus
" Pretty scroll/cursor stuff
set cursorline
set scrolloff=5
" Turns on code folding as long as you indent your
" code like a good little programmer
set foldmethod=indent
set foldlevel=99
"nnoremap <space> za
nnoremap <silent> <F9> :!clear;python %<CR>
" Leader mappings
noremap <leader>s :update<CR>
nnoremap <leader>sl :wq<CR>
noremap <leader>h <C-PageUp>
noremap <leader>l <C-PageDown>
" Split behavior
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
set splitbelow
set splitright
filetype plugin on
"Colors/theme
syntax enable
set t_Co=256
"Sets white line numbers
set number
highlight LineNr ctermfg=white
" Theme
set background=dark
colorscheme monokai
"ctrl+shift+P shows the label for given syntax (i.e. cBlock)
nmap <C-S-P> :call <SID>SynStack()<CR>
function! <SID>SynStack()
if !exists("*synstack")
return
endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
endfunc
if &term =~ '256color'
" Disable Background Color Erase (BCE) so that color schemes
" work properly when Vim is used inside tmux and GNU screen.
set t_ut=
endif