Simple problem: I have a JSON file that is used for snapshot serialization of a JS-based VM.

It contains a shitload of data and every single editor crashes while trying to open it, except vim. But, vim, of course - can't right click and copy the whole file into the clipboard.

When trying out vim-gtk, vim-nox, vim-gnome etc., they don't offer a proper GTK GUI for Gnome3. They all missed updating the library to GTK3, so I have no menu, no mouse, no context menus etc. there.

So I can't open the file with any GTK based editor (mousepad, leafpad, geany, gedit, etc. - all will crash, trust me). I tried out every single editor that was mentioned on Google Fu lists, forum posts etc. Really, all will crash because you can't simply deactivate syntax highlighting.

I simply want the text content of the whole file in the clipboard, so I can paste it into the Web Browser of my choice.

How to achieve that?

PS: No, I won't install whole KDE for a simple clipboard task.


You could try pastebinit, you'll get a link to open the json file in your browser:

sudo apt-get install pastebinit
cat data.json | pastebinit -b http://paste.ubuntu.com

Remove the extension of the file, I assume that it is "json". Therefore no syntax highlighting should be applied.

$ cp your_file.json your_file
$ gedit your_file
  • Where can the extensions for gedit, for example, be found? – user3400700 Mar 27 '15 at 12:15
  • cp your_file.json your_file and then gedit your_file – A.B. Mar 27 '15 at 12:23

emelFM2 is a file manager that comes with an internal GTK-based text viewer and editor (bound to F3 and F4). It has no syntax highlighting. To install use the emelFM2 PPA (release).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.