Console only: set up nvim-qy/gvim as editor

I am using joplin 1.0.162 (prod) on Fedora. This uses the 5.5 kernel and therefore the GUI app for Joplin crashes…

I want to set up nvim-qt as the external editor but cannot figure out what command to invoke. All the documentation I have found refers to using the GUI which I cannot do.

Anyone care to help?

Thank you.

I think setting the EDITOR environment variable may do the trick

I did try setting the EDITOR to nvim-qt, sadly there is no change in behaviour.

Joplin (Gui and I think terminal) will use your system default for MD file extensions. So you’ll have to set the default applications for the markdown mime type.
the easier method however is to use the config command in Joplin terminal (which is what I assume you’re using)

e.g.

config editor "subl -w"

more information can be found in there terminal app documentation

1 Like

Thank you kindly. This does open a nvim-qt window just fine. However, the file is empty! :sob:

Any idea?

Does it open with a filename? Or just open a new window? Could be that the nvim-qt client needs a command line parameter to take a filename.

It opens a file called ~/.config/joplin/tmp/dfd08a01cfb8485fb34caa7624880fbe.md which does not exists and is empty.

nvim-qt takes file names as its last command. So, nvim-qt ook.mdwn would open the ook.mdwn file in the current directory.

Do you know which version of the terminal app you’re on? It’s possible this is a bug that has since been fixed. I’m kind of at a loss for what could be causing this that wouldn’t happen affect everyone.

joplin 1.0.162 (prod) is what I have.

Trust me to find the obscure bug! … :relaxed:

Could it be because I am using encryption? Normal console nvim seems to cope with it fine and has a very similar file name. Just the letters/numbers are different.

So if you set the editor as nvim, you can open notes just fine? But when you switch to nvim-qt the filename changes and opens nothing?
I really don’t know what could be causing that. can you share an example of how the paths differ?

Well, the nvim-qt windows opens, there’s just nothing in it.

The files names look are:

  • d57f465fd46342af92c864f081004c28.md for nvim.
  • a62ef82e1de34a1e8f9111e2313e4bc6.md for nvim-qt.

Very odd indeed.

And just to confirm, you’re opening the same note, correct?

I don’t know if what I am saying is relevant or not, but editors which spawns off its process from the current terminal (ie, if you run the editor from a terminal emulator you will get the prompt back without using &) tend to have problems with the watch mode. For an instance if you use them for the git commit editor you will get wrong results.

That’s a possibility, maybe Joplin cleans up the file before it’s even opened by the editor.

Note that while the desktop app works in watch mode, the CLI app expects the editor to be modal (such as vim), and when the editor closes the app gets the note content back. So if you pick a non-modal editor, it won’t work.

Eventually the Cli app should be updated to use the watch technique too, but it’s never been done.

2 Likes

Yes, I am.

That would indeed explain it! Thank you.

Okay. Cool. Shame the GUI does not work with the 5.5 kernel but hopefully that will be fixed soon.