# How to change editor to vim in mac os?

**URL:** <https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327>\
**Category:** Support\
**Created:** [9 May 2019 10:02 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327 "2019-05-09T10:02:02Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![bos1234](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@bos1234](https://discourse.joplinapp.org/u/bos1234)\
**Post date:** [9 May 2019 10:02 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/1 "2019-05-09T10:02:02Z")

</div>

when I click on Joplin and navigate to preferences, my options are:  
general options, encryption options and web clipper.  
From the faq it says I can change to vim as my external editor if I go to settings.

How do I get to settings?

Found the answer:  
joplin \> preferences \> general options \> text editor command.

Could the mods please add this to the faq when time permits

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [9 May 2019 19:07 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/2 "2019-05-09T19:07:18Z")

</div>

I’m not sure what you want us to add to the FAQ. Can you be a bit more specific?

Setting the editor is literally the 4th option in the preferences. As a macOS user you know that opening settings/preferences/options is `Cmd + ,`.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [10 May 2019 15:36 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/3 "2019-05-10T15:36:42Z")

</div>

I think he meant that we call that Settings in the FAQ but it’s called Preferences in the UI. I’ve updated the FAQ to fix this.

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [10 May 2019 19:50 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/4 "2019-05-10T19:50:40Z")

</div>

Hmm, `Preferences` is only available on macOS. On Windows all the options items are in the Tools menu and there’s no Settings menu item at all. I think it is common sense that the term `settings` refers to either a menu item that is called settings, configuration, config, preferences, options, or general options.  
I hope this is not too harsh, but if someone has used a computer before this much should be clear.

I mean you don’t put `2+2=4` into a FAQ.

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [10 May 2019 21:52 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/5 "2019-05-10T21:52:22Z")

</div>

It’s mostly about being consistent. Maybe we should try to unify the menu item names so that, for example, they are all called Preferences. I agree it’s not a massive issue though.

---

<div class="post-metadata">

**Author:** ![tessus](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/tessus/32/13_2.png) [@tessus](https://discourse.joplinapp.org/u/tessus)\
**Post date:** [11 May 2019 00:06 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/6 "2019-05-11T00:06:49Z")

</div>

I’m not sure, if I can agree with that. On macOS people are used to `Preferences...` and `Quit <Appname here>`. On Windows people are used to `Settings` and `Exit`.  
The menu changes were done specifically to make it look more like an macOS app. I doubt that Windows users would like the same menu structure, but maybe I am wrong.

---

<div class="post-metadata">

**Author:** ![bos1234](https://avatars.discourse-cdn.com/v4/letter/b/8e8cbc/32.png) [@bos1234](https://discourse.joplinapp.org/u/bos1234)\
**Post date:** [12 May 2019 11:57 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/7 "2019-05-12T11:57:10Z")

</div>

H Tessus,  
I agree that in that users should know to navigate to the text editor command. But we should be as specific as possible. For example, I just switched from windows to mac a week ago and installed Joplin. It took me a little time to go to joplin \> preferences \> general options then the text editor.  
It’s the little things that make a big difference at the end of the day.

Maybe in the FAQ, macos and windows can be specified. For example, preferences \> general options \> text editor command (mac os).  
Similar for windows

Anyways, amazing app and will recommend to all my peers.

thanks,

---

<div class="post-metadata">

**Author:** ![laurent](https://avatars.discourse-cdn.com/v4/letter/l/ce7236/32.png) [@laurent](https://discourse.joplinapp.org/u/laurent)\
**Post date:** [12 May 2019 13:29 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/8 "2019-05-12T13:29:59Z")

</div>

Yes I think we should group all the settings under one menu item and just use tabs (like on Firefox) to go to the General settings, E2EE settings, etc. I think that would make it a bit less confusing to have just one entry point for all this, and that way we also won’t need sub-menus on macOS for this.

---

<div class="post-metadata">

**Author:** ![extensibleseth](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@extensibleseth](https://discourse.joplinapp.org/u/extensibleseth)\
**Post date:** [14 October 2019 17:32 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/9 "2019-10-14T17:32:13Z")

</div>

Hello. I have a similar question. Setting the external editor path to ‘/usr/bin/vim’, or just, ‘vim’, in the desktop preferences doesn’t do the trick for me. Vim’s in the path and works everywhere else. How would you configure vim as the external editor on Mac OS?

Thanks,  
Seth

---

<div class="post-metadata">

**Author:** ![totlsota](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/totlsota/32/6670_2.png) [@totlsota](https://discourse.joplinapp.org/u/totlsota)\
**Post date:** [17 January 2021 15:28 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/10 "2021-01-17T15:28:48Z")

</div>

OS: Mac 11.1  
Joplin Version: **Joplin 1.6.6 (prod, darwin)**

Has anyone sorted this. I was tempted to put on a new thread. I have googled and tried a bunch, but I can't get vim to work as my editor for Joplin on my Mac. Nothing happens.

By entering: /System/Applications/Utilities/Terminal.app I can get it to open a the terminal, but no arguments I enter get it to edit the file in VIM.

Thanks in advance for any help.

---

<div class="post-metadata">

**Author:** ![cfredericksen](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cfredericksen](https://discourse.joplinapp.org/u/cfredericksen)\
**Post date:** [18 October 2021 15:48 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/11 "2021-10-18T15:48:07Z")

</div>

Have to install MacVim (installed via brew) is the only way I can get this to work.

Path: open  
Arguments: -a /usr/local/Cellar/macvim/8.2-171\_1/MacVim.app

---

<div class="post-metadata">

**Author:** ![stephane-klein](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/stephane-klein/32/13379_2.png) [@stephane-klein](https://discourse.joplinapp.org/u/stephane-klein)\
**Post date:** [2 August 2022 14:28 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/12 "2022-08-02T14:28:08Z")

</div>

I also want to configure Neovim as an external editor under macOS.

For the moment, I have not managed to configure this in Joplin.

---

<div class="post-metadata">

**Author:** ![Mike-Z-DA](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mike-z-da/32/22756_2.png) [@Mike-Z-DA](https://discourse.joplinapp.org/u/Mike-Z-DA)\
**Post date:** [23 September 2024 13:11 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/14 "2024-09-23T13:11:00Z")

</div>

I sorted this on MacOS Sonoma 14, Joplin 3.0.15 (prod, darwin).

1. created a script `joplin-vim-external.sh`
2. made it executable with `chmod +x joplin-vim-external.sh`
3. provided absolute path to this file in Joplin "Path". Left "Arguments" empty.

Contents of the script:

```auto
#!/bin/bash
osascript <<EOF
tell application "Terminal"
    do script "vim '$1'"
    activate
end tell
EOF

```

---

<div class="post-metadata">

**Author:** ![Mike-Z-DA](https://yyz2.discourse-cdn.com/flex028/user_avatar/discourse.joplinapp.org/mike-z-da/32/22756_2.png) [@Mike-Z-DA](https://discourse.joplinapp.org/u/Mike-Z-DA)\
**Post date:** [25 September 2024 10:53 UTC](https://discourse.joplinapp.org/t/how-to-change-editor-to-vim-in-mac-os/2327/15 "2024-09-25T10:53:34Z")

</div>

Improved version that closes the window when vim is closed:

```auto
#!/bin/bash
osascript <<EOF
tell application "Terminal"
    do script "vim '$1'; exit"
    activate
    delay 5
    set win to the front window
    repeat while busy of win is true
        delay 0.5
    end repeat
    close win
end tell
EOF

```
