-
Notifications
You must be signed in to change notification settings - Fork 4
/
vimrc
56 lines (41 loc) · 1.07 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
" Source https://github.com/kaihendry/dotfiles/blob/master/.vimrc
syntax enable
map <F8> :setlocal spell! spelllang=en_gb<CR>
set title
set ruler
set showmatch
set ignorecase
set incsearch
set hlsearch
set bs=2
set nobackup
set encoding=utf-8
set diffopt+=iwhite " Ignore whitespace whilst diffing
set list listchars=nbsp:¬,tab:»·,trail:·,extends:>
set shiftwidth=4
set softtabstop=4
set tabstop=4
set background=dark
set undofile
set undodir=/tmp
syntax on
filetype plugin indent on
set nofoldenable
let g:go_fmt_command = "goimports"
let g:go_auto_type_info = 1
let g:go_auto_sameids = 1
let g:go_highlight_debug = 1
nmap <C-g> :GoDeclsDir<cr>
imap <C-g> <esc>:<C-u>GoDeclsDir<cr>
" Go specific mapping
au Filetype go nmap <leader>ga <Plug>(go-alternate-edit)
au filetype go nmap <leader>t :w<CR>:GoTest<CR>
au filetype go nmap <leader>r :w<CR>:GoRun<CR>
au FileType go nmap <F12> <Plug>(go-def)
augroup GoDebug
autocmd!
au FileType go nmap <F5> :GoDebugStart<CR>
augroup END
set wildmode=longest,list,full
set wildmenu
let g:indent_guides_enable_on_vim_startup = 1