From bf3d786d0711b23d09ce2cd09f2b8bcb41196e72 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Tue, 16 Jul 2024 14:37:42 -0500 Subject: Vim --- vim/pack/downloads/opt/snippets/snippets.vim | 9 ++++++--- vimrc | 19 +++++++++++-------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/vim/pack/downloads/opt/snippets/snippets.vim b/vim/pack/downloads/opt/snippets/snippets.vim index 92f0af7..40743b2 100644 --- a/vim/pack/downloads/opt/snippets/snippets.vim +++ b/vim/pack/downloads/opt/snippets/snippets.vim @@ -1,13 +1,16 @@ autocmd FileType go - \ :iabbrev err@ if err != nil {} + \ :iabbrev err@ if err != nil {} autocmd FileType go - \ :iabbrev h@ ^ifunc A(c *gin.Context) {} + \ :iabbrev h@ ^ifunc A(c *gin.Context) {} autocmd FileType go - \ :iabbrev t@ ^ifunc A(t *testing.T) {} + \ :iabbrev t@ ^ifunc A(t *testing.T) {} +autocmd FileType go + \ :iabbrev s@ ^itype A struct {} + autocmd FileType go \ :iabbrev f@ ^ifunc A() {}f(li diff --git a/vimrc b/vimrc index a4a83fc..decc4ff 100644 --- a/vimrc +++ b/vimrc @@ -22,12 +22,14 @@ syntax on set background=light set termguicolors colorscheme quiet -hi Normal guifg=black guibg=#FFFFEA +set t_Co=256 +set tgc +hi Normal guifg=black guibg=#FEFFFA ""hi Keyword ctermfg=black cterm=bold -hi SpellBad term=reverse term=underline guibg=#FFFFEA -hi SpellCap term=reverse term=underline guibg=#FFFFEA -hi SpellRare term=reverse term=underline guibg=#FFFFEA -hi SpellLocal term=reverse term=underline guibg=#FFFFEA +hi SpellBad term=reverse term=underline guibg=#FEFFFA +hi SpellCap term=reverse term=underline guibg=#FEFFFA +hi SpellRare term=reverse term=underline guibg=#FEFFFA +hi SpellLocal term=reverse term=underline guibg=#FEFFFA "" Cursor - switch between line and full when going to insert mode let &t_SI = "\[6 q" @@ -162,14 +164,15 @@ autocmd Filetype markdown setlocal spell " Keybindings let mapleader=" " noremap , : +nnoremap é noremap e :e! **/* -noremap gd mB:LspGotoDefinition +noremap gd :LspGotoDefinition noremap ]d :LspDiagNext noremap [d :LspDiagPrev noremap ]c :cnext noremap [c :cprev -noremap gs mB:LspDocumentSymbol -noremap gr mB:LspGotoImpl +noremap gs :LspDocumentSymbol +noremap gr :LspGotoImpl noremap ca :LspCodeAction noremap cr :LspRename noremap m :make -- cgit v1.2.3