feat: for golang dev

This commit is contained in:
Klesh Wong 2021-09-08 10:36:38 +08:00
parent 89f2257819
commit 310979a19f
2 changed files with 15 additions and 5 deletions

View File

@ -5,5 +5,10 @@
"python.linting.pylintEnabled": false,
"diagnostic-languageserver.filetypes": {
"sh": "shellcheck"
}
},
"coc.preferences.formatOnSaveFiletypes": [
"rust",
"json",
"go"
]
}

View File

@ -75,7 +75,13 @@ function! WSLCopy()
call system('xsel -b', join(lines, "\n"))
endfunction
function! YankFileLineNo()
let @+=expand("%") . ':' . line(".")
echo @+
endfunction
xnoremap <leader>y <esc>:call WSLCopy()<CR>
nnoremap <leader>yl <esc>:call YankFileLineNo()<Cr>
nmap <leader>"" ysiW"
nmap <leader>'' ysiW'
@ -99,11 +105,13 @@ au ColorScheme * highlight ExtraWhitespace ctermbg=red guibg=red
au Syntax * match ExtraWhitespace /\s\+$/
nnoremap <leader>es :%s/\s\+$//g<CR>
" location jumping
nnoremap <leader>n :cnext<CR>
nnoremap <leader>p :cprev<CR>
" cusorline
nnoremap <leader>cc :set cursorcolumn!<CR>
" auto install vim-plug
if has('nvim')
if has('win32')
@ -329,9 +337,6 @@ endfu
nnoremap <leader>ac :call ToggleGroffMomAutoCompilation()<CR>
autocmd BufEnter,BufRead *.mom :set ft=mom
" for yaml need cursorcolumn
autocmd FileType yaml :set cursorcolumn
" spell highlight
highlight clear SpellBad
highlight SpellBad cterm=underline