I learned vim a while ago but really didn’t use it for main projects or daily work. Lately I decided to rebuild my neovim config from scratch and really enjoyed setting up and using all the parts.

It inspired me to setup similar configurations in other modern editors.

While looking around the internet for similar setups, I found that zed is a very attractive choice for a good combination of vim and modern IDE features.

Configuring in Zed

Zed comes with native vim mode, and it supports surround, commentary out of the box.

I found a lot of helpful tips from official docs

example:

[
  {
    // config for insert mode
    "context": "Editor && vim_mode == insert && !VimWaiting",
    "bindings": {
      // Exit insert mode
      "j k": "vim::NormalBefore"
    }
  },
  {
    // config for normal mode
    "context": "Editor && vim_mode == normal",
    "bindings": {
      // search files
      // leader key space is defined as space itself.
      "space s f": "file_finder::Toggle"
    }
  }
]

Although I am using it like vim, I find myself not following the vim-way of doing things like jumping through words by exiting insert mode and entering normal mode, I could stay in insert mode and use opt + arrow keys to jump through words.

Configuring in VSCode

VScode has certain settings which is similar to vim.

I could configure a leader key and key chords similar to vim settings.

example:

settings.json

{
  // setting space as leader key
  "vim.leader": "<space>",

  // settings for insert mode
  "vim.insertModeKeyBindingsNonRecursive": [
    {
      "before": ["j", "k"],
      "after": ["<Esc>"]
    }
  ],

  // settings for normal mode
  "vim.normalModeKeyBindingsNonRecursive": [
    { "before": ["leader", "s", "f"], "commands": ["workbench.action.quickOpen"] }
  ]
}

Configuring in IntelliJ

IntelliJ has a plugin called IdeaVim which is a vim emulation plugin for IntelliJ.

Vim settings can be configured in ~/.ideavimrc file. Which is similar to vim settings.

example:

" setting space as leader key
let mapleader = " "

" settings for insert mode
inoremap jk <Esc>

" settings for normal mode
nnoremap <leader>sf :action SearchEverywhere<CR>

Conclusion

I am really enjoying vim motions and keybindings, now that when I apply it to all editors, It makes it much more fun to use.

Generally I’m not a fan of having multiple ways of doing same thing, and bloating of features.

But modern IDE features are very helpful for large projects and adding vim motinos to the mix makes it more enjoyable to use. I see myself using this setup for quite long time, and will be more inclined to use neovim and zed for most of my work.