# \[Space-Script\] Enable vim mode by default

**URL:** <https://community.silverbullet.md/t/space-script-enable-vim-mode-by-default/1818>\
**Category:** Tricks & Techniques\
**Created:** [February 18, 2025, 3:40pm UTC](https://community.silverbullet.md/t/space-script-enable-vim-mode-by-default/1818 "2025-02-18T15:40:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rharmonson](https://community.silverbullet.md/user_avatar/community.silverbullet.md/rharmonson/32/1038_2.png) [@rharmonson](https://community.silverbullet.md/u/rharmonson)\
**Post date:** [February 18, 2025, 3:40pm UTC](https://community.silverbullet.md/t/space-script-enable-vim-mode-by-default/1818/1 "2025-02-18T15:40:03Z")

</div>

Looking for guidance on enabling vim mode by default.

I looked for an option in ! [SETTINGS](http://silverbullet.md/SETTINGS) but didn’t see it. Maybe a smart script?

Appreciate your time and guidance.

---

<div class="post-metadata">

**Author:** ![rharmonson](https://community.silverbullet.md/user_avatar/community.silverbullet.md/rharmonson/32/1038_2.png) [@rharmonson](https://community.silverbullet.md/u/rharmonson)\
**Post date:** [February 18, 2025, 3:48pm UTC](https://community.silverbullet.md/t/space-script-enable-vim-mode-by-default/1818/2 "2025-02-18T15:48:08Z")

</div>

May have answered my own question. I took a shot in the dark and modeled a vim mode smart script after the dark mode smart script posted [HERE](https://community.silverbullet.md/t/permanent-dark-mode/370/3). Seems to be working.

```auto
silverbullet.registerEventListener({name: "editor:init"}, async () => {
  if(!await clientStore.get("vimMode")) {
    await clientStore.set("vimMode", true);
    await editor.reloadUI();
  }
});

```

If there is a better way, please share.

---

<div class="post-metadata">

**Author:** ![Platinum](https://community.silverbullet.md/user_avatar/community.silverbullet.md/platinum/32/2510_2.png) [@Platinum](https://community.silverbullet.md/u/Platinum)\
**Post date:** [January 9, 2026, 5:32pm UTC](https://community.silverbullet.md/t/space-script-enable-vim-mode-by-default/1818/3 "2026-01-09T17:32:37Z")

</div>

Does anyone know if this is still the best way? If there is a `config.set { vim =` section in `CONFIG`, will SB default to using vim? Or is there a better way to set this at startup?

AFAICT, vim mode persists across sessions. So perhaps the way is to simply set it manually once instead of via a config?
