You are not logged in.
I prefer to use xed for editing text files. After installing LibreOffice, opening a text file through nnn will open Writer by default. Of course, I can press "o" to open with whatever I want, but it would be convenient if I could change the default text editor.
After searching for a bit, I found that I could add the following line to `.bashrc`:
export EDITOR=/bin/xed
I tried a couple variants of this, including `/bin/xed` and just `xed`, but it still opens LibreOffice Writer. What else can I try to set the default text editor?
I'm in Hyprland, I'm not sure if there's something I can do in the config there.
Last edited by TySpicer (2025-09-18 00:01:50)
Offline
i dont use NNN or wayland but im guessing its a default opener for mimetype, should be as simple as changing the default for 'text/plain' in ~/.config/mimeapps.list
Offline
Use your favorite graphic gui file manager to set mime type of filetype; I use for that double commander, thunar also can do that: right mouse click on txt file, open with, other, select desired app and set to always open with this app. It's similar like in Windows.
Offline
Thanks for the help! This was a pretty easy fix. I installed selectdefaultapplication-git, which worked instantly.
Offline