When Im writing shell scripts I often want to run/check a block of code, by
- V highlight block
vim will then execute highlighted block and display output at the bottom of vim's display - displacing the current buffer with the shell output.
The problem is sometimes the output goes beyond the top of the screen and when in that state, no key commands to navigate the text seem available - i.e. any key just returns back to the buffer.
Ive tried piping into less, e.g.
:'<,'>w !bash | less, this actually crashed my vim instance!
How can I display the output in a useful way, e.g.
- move around the existing output, kind of like less (ideal)
- sending large output to a new buffer (good)
- sending output into a new file (ok, if no better options)