I want to add a mapping which will visualize the output of a shell command in a new window.
the problem is the command is interrupted when moving the cursor to the top of the file.
:execute ":new \| set nonu \| 0r ! ls \| normal! gg"
ls | normal! gg
When a command doesn't accept
<bar> to separate the command. The normal way to fix this is wrap the command in a execute which does except bars
:execute ":new \| set nonu \| execute '0r ! ls' \| normal! gg"