I like to use shell-command-on-region
for pretty printing a selected region of code with prettier.
After selecting a region, I type C-u M-|
and then I use prettier --parser ruby
as the shell command. This is working great. :)
Now, I also like to use TRAMP to open a ruby file on a remote system.
Unfortunately, shell-command-on-region
does not seem to respect TRAMP. It attempts to execute a shell command on my local machine.
On the other hand, if I invoke shell-command
unsing M-!
, this executes a command on the remote machine.
Is there a way to make shell-command-on-region
work together with TRAMP?