I wanted to have the output of a(any) shell command to open up in a vim split. Did a bit of research and found out that the command to do so was:
:new | 0read | ! ls --- (or something of this form)
But the issue I am facing is that when I try to bind it to something like this :
nmap ,s :new | 0read | ! --- (without a specific command at the end)
Also tried with a specific command at the end and same result
it is showing up this error everytime I open up vim:
line 277: E32: No file name Press ENTER or type command to continue
Edit : It was not exactly an issue with binding, the command had a small issue.
Use this command:
nmap ,s :new | 0read !
Btw the accepted answer has a function implementation which is much better than this simple mapping