-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
96 lines (76 loc) · 1.91 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
" Space leader!
let mapleader = " "
set noswapfile
set encoding=utf-8
set ruler
set showcmd
set laststatus=2
set number
set rtp+=/usr/local/opt/fzf
" pull in other vim settings
source ~/.vim/autocommand.vim
source ~/.vim/linters.vim
source ~/.vim/mapping.vim
source ~/.vim/test_runners.vim
source ~/.vim/projections.vim
source ~/.vim/vundle.vim
" syntax
syntax enable
filetype plugin indent on
set showmatch
" tabs
set expandtab
set smarttab
set tabstop=2
set shiftwidth=2
set softtabstop=2
" indentation
set autoindent
set cindent
" Search behavior
set incsearch
set hlsearch
" Keyboard behaviors
set backspace=indent,eol,start
set splitbelow
set splitright
" colors
set background=dark
colorscheme molokai
set termguicolors
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
" set character limit to 80 per line
set textwidth=80
" tab completion
set complete=.,b,u,]
set wildmode=longest,list:longest
" other stuff
command! W w "because I ALWAYS do :W by accident
command! Q q "because I ALWAYS do :Q by accident
command! Wa wa "because I ALWAYS do :Wa by accident
" allow jumping between do/end, etc. using %
runtime macros/matchit.vim
" matching brackets
highlight MatchParen ctermbg=74
" command line abbreviations
cabbr <expr> %% expand('%:p:h')
" Treat <li> and <p> tags like the block tags they are
let g:html_indent_tags = 'li\|p'
" https://github.com/vim-airline/vim-airline#smarter-tab-line
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='molokai'
" enable mouse mode
if has('mouse')
set mouse=a
endif
set redrawtime=10000
set maxmempattern=10000
" https://github.com/golang/tools/blob/master/gopls/doc/vim.md
let g:go_highlight_operators = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_parameters = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_variable_assignments = 1