How to use LO as a code editor in Linux?

LibreOffice inserts itself as the primary code and text editor in Linux Mint Cinnamon. To edit the mime list and remove it, is a complex and time wasting process. What would I need to to make LibreOffice as my code editor as well?

I think it is better to use a dedicated code editor, like the free Geany or many others.

Don’t. Writer is a “document processor” intended to facilitate complex layout and formatting.

Text editors are better tools for code editing. Many of them have dedicated plugins for various “languages”: they offer code highlighting, syntax checking and more if they are closely integrated in an IDE.

One of the most comprehensive, versatile and powerful solution if KDevelop. But as you are under Cinnamon desktop (which is a variant of GNOME), this means that installing KDevelop will bring in all the KDE library. Use the Builder GNOME IDE instead.

1 Like

@ajlittoz thanks for the info about KDE and Gnome.

I would never use it as a text or code editor, I was just wondering why is it declared as such and who at LO thought up of the idea.

Nobody, and certainly no LO developer, declared LO as a text editor. What may have happened, the file association list may have been corrupted during an update of your system. LO declares to the system the wealth of file extensions it can handle. Among them you find text/plain, text/html and many others. For each MIME type, there is a list of extensions. You also have is list of applications capable of displaying/editing this type of file. The applications are sorted in order of precedence. For text/plain and extensions *.asc and *.txt, the text editors come first (KWrite and Kate on my machine), then a variety of other applications (LO Writer and Okular here).

It may happen that the order may be “damaged” and you find LO before ordinary text editors. It happened long ago on one of my accounts on my laptop and Writer was launched instead of KWrite. Hard to fix chirurgically. I erased all hidden directories when I was really fed up with and let the desktop manager reinitialise everything.

1 Like

There is also the role of package maintainers for debian/*buntu/mint/cinnamon


Maybe this question is better placed in a forum for Linux-mint, to find out who else has this problem. (I don’t think, it is inherited from Ubuntu, as they use Snap, but even this is a possibility).

Thanks to all. But, before posting in the Linux Mint forum, I wanted to be prepared because someone will immediately point the finger to LibreOffice. Although, it may be a marketing arrangement between LO and LM. I also witnessed LMC altered a key feature of an app.