diff options
author | Marc Coquand <marc@mccd.space> | 2024-07-03 12:10:12 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-07-03 12:10:12 -0500 |
commit | b718b8ef6eaacec84668c40f9ab52dda12df6669 (patch) | |
tree | 63a0369a75efa14dd3d16db25ceda314b9de400b /vim | |
parent | 642c61aa0597819c27f3587ed417abecb322e56c (diff) | |
download | openbsd-b718b8ef6eaacec84668c40f9ab52dda12df6669.tar.gz openbsd-b718b8ef6eaacec84668c40f9ab52dda12df6669.tar.bz2 openbsd-b718b8ef6eaacec84668c40f9ab52dda12df6669.zip |
Alpine stuff
Diffstat (limited to '')
-rw-r--r-- | vim/pack/downloads/opt/snippets/snippets.vim | 14 | ||||
-rw-r--r-- | vimrc | 13 |
2 files changed, 27 insertions, 0 deletions
diff --git a/vim/pack/downloads/opt/snippets/snippets.vim b/vim/pack/downloads/opt/snippets/snippets.vim new file mode 100644 index 0000000..d4c6e4e --- /dev/null +++ b/vim/pack/downloads/opt/snippets/snippets.vim @@ -0,0 +1,14 @@ + +autocmd FileType go + \ :iabbrev <buffer> err@ if err != nil {}<Left><Enter><Left> + +autocmd FileType go + \ :iabbrev <buffer> hand@ <Backspace><Esc>^ifunc <Esc>A(c *gin.Context) { + +autocmd FileType go + \ :iabbrev <buffer> fat@ log.Fatal(" %v", err)<Esc>F%i<Left> + +:autocmd FileType php,html.twig,html,javascript,typescript,vue,go + \ :iabbrev <buffer> if@ if() {<CR>}<Esc>%<Left><Left>i + + @@ -1,5 +1,8 @@ packadd snippets +" General +set ignorecase + " Indentation set tabstop=8 set shiftround @@ -13,6 +16,8 @@ syntax on set background=light set rnu colorscheme quiet +set incsearch +set matchpairs+=<:> hi Normal ctermfg=black ctermbg=white "hi Keyword ctermfg=black cterm=bold hi SpellBad term=reverse cterm=underline ctermfg=124 ctermbg=white @@ -113,6 +118,8 @@ end autocmd Filetype go set makeprg=go\ build autocmd Filetype go autocmd BufWritePre <buffer> :LspFormat +au BufRead,BufNewFile *.tmpl set filetype=tmpl +autocmd Filetype tmpl setlocal tabstop=2 " Nix if exists('g:loaded_lsp') @@ -137,11 +144,17 @@ if exists('g:loaded_lsp') end +autocmd Filetype markdown setlocal spell + + + " Keybindings let mapleader=" " noremap , : noremap <leader>e :e **/ noremap <silent> gd mB:LspGotoDefinition<Enter> +noremap <silent> ]d :LspDiagNext<Enter> +noremap <silent> [d :LspDiagPrev<Enter> noremap <silent> gs mB:LspDocumentSymbol<Enter> noremap <silent> gr mB:LspGotoImpl<Enter> noremap <leader>ca :LspCodeAction<Enter> |