diepm / vim-rest-console

A REST console for Vim.
658 stars 54 forks source link

Problems overriding the file type in the output buffer. #51

Closed bitterjug closed 6 years ago

bitterjug commented 6 years ago

filetype can also be set in the output buffer on an ad hoc basis.

    # vim: set ft=json

But I can't change anything in the output buffer because modifiable is off.

    let g:vrc_output_buffer_name = '__VRC_OUTPUT.<filetype>'

This creates a buffer with that name literally, does not add the filetype. I suspect this is because my server doesn't set the content type. But I know I will be getting JSON. I'd like to be able set the file type for the response as an option in my .rest file on a per request basis.

And, ideally, I'd like to be able to pipe the response through jq or json_pp before it appears, is that possible?

bitterjug commented 6 years ago

I just read in #47 that adding -i isS to my curl options gives me the response headers and formatted json response.

diepm commented 6 years ago

Glad you can resolve it!