From 8a0b9593bf671c60cd242874798bd9f43be9e1a3 Mon Sep 17 00:00:00 2001 From: Marc Coquand Date: Fri, 12 Jul 2024 09:55:09 -0500 Subject: vim updates --- vimrc | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index f127d51..ad5fdf8 100644 --- a/vimrc +++ b/vimrc @@ -1,15 +1,20 @@ packadd snippets - -" General +" +"" General set ignorecase - -" Indentation +" +"" Tab completion +inoremap pumvisible() ? "\" : "\" +inoremap pumvisible() ? "\" : "\" +" +"" Indentation set tabstop=8 set shiftround set nobackup set autoindent set smartindent set cindent +set nu " Theme syntax on @@ -24,7 +29,7 @@ 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 - +" " Cursor - switch between line and full let &t_SI = "\[6 q" let &t_SR = "\[4 q" @@ -118,14 +123,17 @@ if exists('g:loaded_lsp') \ }]) end -autocmd FileType go setlocal omnifunc=lsp#complete +filetype plugin on autocmd Filetype go set makeprg=go\ build -autocmd Filetype go autocmd BufWritePre :LspFormat +"autocmd Filetype go autocmd BufWritePre :LspFormat +" Auto test directory with t +autocmd Filetype go nnoremap t :!go test %:h/*.go au BufRead,BufNewFile *.tmpl set filetype=gohtml autocmd Filetype gohtml setlocal tabstop=2 autocmd Filetype gohtml setlocal formatprg=djlint\ --profile=golang\ --reformat\ - + " Nix if exists('g:loaded_lsp') call LspAddServer([#{ @@ -172,18 +180,17 @@ nnoremap = :LspFormat " Spell au BufEnter *.org set spell - +" " Wildmenu set wildmenu -set wildmode=longest:full,lastused set wildignore=_build/**,release/**,node_modules/** -set wildoptions+=fuzzy +set wildoptions=fuzzy " Grep set grepprg=git\ grep\ -nH -" Auto go to previous X +" Auto add marks augroup VIMRC autocmd! autocmd BufLeave *.css,*.scss normal! mC -- cgit v1.2.3