Edit notes in external editor

I started using Joplin on my Mac and I love the idea to have a safe place for searchable notes. Before I was using text/markdown files in a folder. I miss the features of the text editors I was using, especially the ability to search words within a file and jump to the occurrences of the searched terms. This seems a feature available in Windows and Android but I did not see plans to extend it to other platforms like OS X. Furthermore, other editors like vim, emacs, sublime, etc. would bring many more features difficult to implement, plugins, and to many users the ease of use given by familiarity.
I’d love if Joplin would provide a button to start editing a note in an external editor (configurable somewhere). It could sync with a local markdown file or use a protocol similar to rmate (https://github.com/textmate/rmate)

1 Like

if i’m not wrong it’s already the case with joplin terminal, you need to set the editor:

:config editor /path/to/vim 

or as the doc says:

The configuration can also be changed from command-line mode. For example, to change the current editor to Sublime Text:

config editor "subl -w"

or just ssh -X

I too, would like to see an option in macOS to open/edit notes in an external editor.

The native Joplin editor misses some crucial editing capabilities like block editing, sorting of lines, selecting (and editing) all occurrences of a word throughout a note, ... I'm aware that such features might be hard to implement, but giving users the option to edit a note in an external editor would go a long way to alleviate the lack of functionality.

1 Like

If I’m not mistaken it’s been requested before, and I’d also like to be able to edit notes in an external editor. There’s probably a GitHub issue about it somewhere, but if not feel free to create it.

I couldn’t find a github issue.

/ref https://github.com/laurent22/joplin/issues/611

Setting the external editor in the terminal version (on the mac) seems to bring up the note fine but even though the note seems to save, the changes are not reflected in Joplin. Is anyone else using /usr/bin/nano for editing? Is there a better option?

@ebonair for the cli version you always have to set an external editor. this topic was created for the desktop versions and has already been implemented in this commit and is therefore solved.
The OP didn’t mark it solved, but I have noticed a lot of people don’t do that. I just have marked it now.

What do you mean by not reflected in Joplin? Are you talking about the desktop app? So are you using both versions cli and desktop? Are you using the same sync trarget for both versions?

I’m using vim for editing in the cli app and Sublime Text for external editing in the desktop app. Both work without any issues.

I am using three versions, Windows Portable, Android and cli on the mac. I changed the config for the editor on the mac to /usr/bin/nano (my vim is very rusty) and when I hit enter on a note, nano does start with the the correct note loaded. If I then make any changes and save them in nano, they appear to save but the note itself is not updated. I will give vim a shot to see if it works for me. Thanks.

Update: I got both vim and nano to work. :grinning:

Can you please tell people how you got it to work? What was the issue in the first place?

(Don't you hate it, if you search for an issue on the Internet. You find one in a forum. Endless discussions about an issue. You think: "awesome, I'm not the only one with this problem". After reading pages of forum entries you read finally the last one: Found the solution.)

I am not sure why it did not work the first time, it’s possible I mis-keyed the config entry.

Both nano and vim on the mac work by using the commands:


I made the change and restarted Joplin, although I don’t think that is necessary.

Thanks a lot for the info. I always point out the solution, even if I screwed up. Just because I made a mistake it doesn't mean that somebody else won't make (or hasn't made) the same mistake as well.

Although I don't think you miskeyed the config entry, otherwise nano would not have started in the first place. Unless you added a read only option. :wink: Anyway, thanks again.