I'm trying to do the following:
autocmd BufWritePost *.py :!isort % | :edit
isort command in this case is writing to the buffer and so I'd like to reload the buffer to see the changes to the file I'm currently viewing.
But i find that because I've triggered a shell command
! the pipe is interpreted as part of the shell command and not as part of a chained vim Ex command.
Is there a way to do this?
I tried grouping the shell command so it was separate from the pipe/Ex command (In my head I imagined some magic making this work sort of like a subprocess):
autocmd BufWritePost *.py :(!isort %) | :edit
But that was invalid.