On 07.11.2018, at 19:12 , mail(a)bibiko.de wrote:
On 7. Nov 2018, at 13:44, Dr Eberhard W Lisse
<el(a)lisse.na> wrote:
I occasionally want to pipe JSON (or XML, or other formats) like
csvjson file.csv | mate -
It does display the file but as plain text.
my hack would be
csvjson file.csv > /tmp/___q.json | mate -m untitled /tmp/___q.json && rm
/tmp/___q.json
ergo write to a file with the desired extension first, then open it in TM as ‘untitled’
and finally remove the temporary file.
Option -t for mate doesn’t work either for me.
-Hans
I think you need to specify the grammar name [1] after the option `-t`. At least the
following command works on my machine:
echo '"Hello JSON"' | mate -t source.json
.
Kind regards,
René
[1]: