I\'m trying to craft a command to dump vim\'s highlighting information to STDOUT. I can write successfully to a file like this:
vim +\'redir >outfile\' +\
I ran into this by mistake while running your first command. The second time I ran it, it went to stdout. I guess this is because the file already existed. So you can try (sending to something that already exists):
vim +'redir >/dev/null' +'hi' +'redir END' +'q'