-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: explain how to integrate with vim #363
Comments
I have no idea how to do this. It's probably a case of writing an autocmd to pipe through the I'd be happy to take a PR for the docs update if you find a way that works. |
This vimrc config worked for me: set autoread
autocmd BufWritePost *.templ silent! execute "!PATH=\"$PATH:$(go env GOPATH)/bin\" templ fmt <afile> >/dev/null 2>&1" | redraw!
|
This works great! Thank you! |
So, do we need another docs update to close this off, or are we happy we've got enough info now? |
I think it’d be smart to include it in docs, since Vim is a widely used editor, and this is such an easy and dramatic way to improve the developer experience. |
There's lots of docs for integrating with neovim here: https://templ.guide/commands-and-tools/ide-support/
It would be great to document how we can add "Format on Save" support to vim itself.
The text was updated successfully, but these errors were encountered: