-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvimrc
More file actions
58 lines (46 loc) · 1.59 KB
/
Copy pathvimrc
File metadata and controls
58 lines (46 loc) · 1.59 KB
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
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
" In case of using https://github.com/Alligator/accent.vim
let g:accent_colour = 'blue'
let g:accent_no_bg = 1
if has("gui_running")
set guifont=JetBrains\ Mono\ 12
" Get more screen real estate
set guioptions-=T
set background=dark
let g:accent_no_bg = 0
endif
"colorscheme darkblue
set termguicolors
set background=dark
" https://vi.stackexchange.com/a/11832
highlight Visual cterm=reverse ctermbg=NONE
" https://stackoverflow.com/a/1117532/1354742
"highlight Normal ctermbg=NONE
set expandtab
set shiftwidth=4
set softtabstop=4
" Stolen from nano :)
nmap <A-Left> :bprev<CR>
nmap <A-Right> :bnext<CR>
" https://github.com/fatih/vim-go/wiki/Tutorial
autocmd FileType go,gomod,godoc setlocal noexpandtab shiftwidth=4 tabstop=4
autocmd FileType go nmap <Leader>i <Plug>(go-info)
autocmd FileType go nmap <Leader>d <Plug>(go-doc)
autocmd FileType go nmap <Leader>e <Plug>(go-alternate-edit)
autocmd FileType go nmap <Leader>l <Plug>(go-lint)
autocmd FileType go nmap <leader>b <Plug>(go-build)
autocmd FileType go nmap <leader>r <Plug>(go-run)
autocmd FileType go nmap <leader>t <Plug>(go-test)
autocmd FileType go nmap <Leader>c <Plug>(go-coverage-toggle)
autocmd FileType go nmap <Leader>v <Plug>(go-vet)
let g:go_addtags_transform = "camelcase"
let g:go_auto_type_info = 1
let g:go_highlight_functions = 1
" Errors list
map <C-n> :cnext<CR>
map <C-m> :cprevious<CR>
nnoremap <Leader>a :cclose<CR>
" Other
autocmd FileType bash,sh setlocal expandtab shiftwidth=2 softtabstop=2
autocmd FileType vim setlocal expandtab shiftwidth=2 softtabstop=2