DEV Community

Tomas Spoturno
Tomas Spoturno

Posted on

Vim plug for vscode

It is worth it?

I've been using this plugin for at least 2 months and since I discovered it, my personal typing experience has improved significantly. Before I know this tool I used to watch some programming videos on YouTube and many of them had this special ability of typing without arrow keys, and at that moment I didn't understand how that works, so I begin searching. I found out about vim / neovim and all its complex structure and I get it loved with.

Vim provides a different way of interacting with text from anything I've ever seen, it gives you a completely different level of control and fluency when editing code.

  • Vim makes you faster.
  • Vim makes you more precise
  • Vim thins the interface between your brain and the computer
  • Vim thins the interface between your brain and the computer
  • raise your programmer status

If you are doubting of using it, definitely give it a try, I assure it won't disappoint you.

Why Vim in VS Code and not just Vim?

The truth is that setting Vim to work with a feature similar to modern text editors is not a trivial task. Features like code completion, code navigation, error messages, etc,
although they are compatible with Vim, they do not work perfectly out of the box.
Visual Studio Code and Vim offer a very sweet integration that involves the super rich development user experience of Visual Studio Code with lots of the amazing features present in vim.

VsCodeVim install and config

You will need to install the vscodevim plugin:

  1. Open Visual Studio Code
  2. Go to Extensions
  3. Type vim in the search box
  4. The first one named Vim is the one
  5. Install it and start journey

After installed the plugin go for the file setting.json to do some settings, I recommend you going for the official repo on git hub: VSCodeVim. Here's my personal vim configuration (paste in settings.json file):

{
  "vim.easymotion": true,
  "vim.incsearch": true,
  "vim.useSystemClipboard": true,
  "vim.useCtrlKeys": true,
  "vim.hlsearch": true,
  "editor.lineNumbers":"relative",
  "vim.leader": "<space>",
  "vim.insertModeKeyBindings": [
    {
      "before": ["k", "j"],
      "after": ["<Esc>"]
    }
  ],
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["<leader>", "d"],
      "after": ["d", "d"]
    },
    {
      "before": ["<C-n>"],
      "commands": [":nohl"]
    }
  ],
  "vim.leader": "<space>",
  "vim.handleKeys": {
    "<C-a>": false,
    "<C-f>": false
  },
  "vim.normalModeKeyBindings": [
    {
    "before":[":"],
    "commands":[
       "workbench.action.showCommands"
     ]
    }
  ],

}

Enter fullscreen mode Exit fullscreen mode

Tips

  • Go VSCodeVim, there you will be finding all you need to get started.
  • Take your time to understand things, don't rush yourself.

Latest comments (0)