From 278259138b842f87088d2ba4fc5a068d3cc0d64d Mon Sep 17 00:00:00 2001 From: Joe Davidson Date: Sat, 1 Jun 2024 20:34:44 +0100 Subject: [PATCH] chore: document formatting with vim (#769) --- docs/docs/09-commands-and-tools/02-ide-support.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/docs/09-commands-and-tools/02-ide-support.md b/docs/docs/09-commands-and-tools/02-ide-support.md index 639c9bf94..6606532d7 100644 --- a/docs/docs/09-commands-and-tools/02-ide-support.md +++ b/docs/docs/09-commands-and-tools/02-ide-support.md @@ -322,6 +322,15 @@ require'nvim-treesitter.configs'.setup { } ``` +## Vim + +Currently support for vim is limited. Configure formatting with the following VimScript: + +```vim +set autoread +autocmd BufWritePost *.templ silent! execute "!PATH=\"$PATH:$(go env GOPATH)/bin\" templ fmt >/dev/null 2>&1" | redraw! +``` + ## Helix https://helix-editor.com/