fmstrat
link
fedilink
246M

Works fine in vim

Except if it’s a single line file, only god can help you then. (Or running prettier -w on it before opening it or whatever.)

4.2 megs on one line? Vim probably can handle it fine, although syntax won’t be highlighted past a certain point

I’ve accidentally opened enormous single line json files more than once. Could be lsp config or treesitter or any number of things but trying to do any operations after opening such a file is not a good time.

Yeah, very well may be. LSPs always slow down opening big files, so I usually inspect those with an empty/different config

BaldProphet
link
fedilink
36M

Technically every JSON file is a single line, with line break characters here and there

:syntax off and it works just fine.

@xavier666@lemm.ee
link
fedilink
English
96M

cat file.json | jq also works

Render Media works the best

rm file.json

@xavier666@lemm.ee
link
fedilink
English
36M

Yes, Render Media is the best. It’s hard to believe that not many people know about this tool. It’s also natively installed in all Linux distros.

@expr@programming.dev
link
fedilink
4
edit-2
6M

https://porkmail.org/era/unix/award#cat

jq < file.json

cat is for concatenating multiple files, not redirecting single files.

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 77 users / day
  • 211 users / week
  • 413 users / month
  • 2.92K users / 6 months
  • 1 subscriber
  • 1.53K Posts
  • 33.8K Comments
  • Modlog