How to modify/change the vimrc file in VsCode?

Solution 1: @Jdeep's https://stackoverflow.com/a/63030352/8652240

Solution 2: Edit your .vimrc file from your Operating system's folder.

enter image description here

Or replace your personal .vimrc but make sure the filename is exactly (.vimrc) (yes, the period included as well)

If solution 1 and solution 2 don't work, verify vimrc in settings.json is enabled like this:

  1. Windows 10 user can open settings.json in
  • C:\Users<user>\AppData\Roaming\Code\User\settings.json

enter image description here

  1. Open VS Code
  2. Open settings.json (Control + ,)
  • File > Preferences > Settings > Enter "settings"
  • Note: don't click on a similar file named defaultSettings.json
  1. Scroll down and click on link "Edit in settings.json"

enter image description here

  1. verify "vim.vimrc.enable": true

enter image description here

  1. Save and reload VS Code

You may achieve the same result by inserting
"vim.vimrc.enable": true into your vscode setting.json.


Make sure you have a /.vimrc or /_vimrc file in $HOME directory and follow the follow the following steps :

  1. Open VScode and go to settings.
  2. Type vimrc
  3. Enable Use Keymappings from a .vimrc file

img1

  1. Modify the vimrc file according to your needs.

  • Windows machine in Powershell

    cd ~
    
    # create the .vimrc file - it might already exist
    New-Item -ItemType File .\.vimrc 
    
    # Open VS Code to modify your vim settings
    code .\.vimrc
    
  • In VS Code Press F1 and type Open Settings JSON

  • In settings.json add

    "vim.vimrc.enable": true
    
  • Navigate back to your .vimrc

And modify it as you please.