Skip to content
Yefer YV edited this page Nov 16, 2025 · 13 revisions

change/add whichkey keymaps

  • add this to your settings.json

    {
      "whichkey.bindingOverrides": [
        {
          "keys": "g.s",
          "name": "Go to line",
          "type": "command",
          "command": "workbench.action.gotoLine"
        }
      ]
    }

read more

add your-cool-plugin

  • copy retronvim's init.lua and add your plugins/modification:

    cp ~/.vscode/extensions/yeferyv.retronvim*/nvim/init.lua ~/.config/retronvim/init.lua

    add to your settings.json:

    "vscode-neovim.neovimInitVimPaths.linux": "$HOME/.config/retronvim/init.lua"

    open (to test/debug) with:

    NVIM_APPNAME=retronvim nvim

  • example install vscode-multiple-cursor

    add to your init.lua:

    add('https://github.com/vscode-neovim/vscode-multi-cursor.nvim')
    require('vscode-multi-cursor').setup()
    
    map('n', 'gb', 'mciw*<cmd>nohl<cr>', { remap = true, desc = "add virtual cursor (select and find)" })
    map('n', 'gB', 'mcgfn<cmd>nohl<cr>', { remap = true, desc = "add virtual cursor (find selected)" })
    map('n', 'go', 'mciwj<cmd>nohl<cr>', { remap = true, desc = "add virtual cursor down" })
    map('n', 'gO', 'mciwk<cmd>nohl<cr>', { remap = true, desc = "add virtual cursor up" })
    map('x', 'gb', 'mc*<cmd>nohl<cr>', { remap = true, desc = "add virtual cursor (select and find)" })
    map('x', 'gB', 'mc*<cmd>nohl<cr>', { remap = true, desc = "add virtual cursor (find selected)" })
    map('x', 'go', 'omcj<cmd>nohl<cr>', { remap = true, desc = "visual selected to virtual cursor (ctrl+left=prevword)" })
    map('x', 'gO', 'omck<cmd>nohl<cr>', { remap = true, desc = "visual selected to virtual cursor (ctrl+right=nextword)" })
    map(
      { "n" },
      "gW",
      function()
        vim.cmd [[ call feedkeys('viimi') ]]
        vim.defer_fn(function() vscode.action("cursorWordEndRightSelect") end, 100)
      end,
      { desc = "word-column multicursor (vscode only)" }
    )

install only RetroNvim's neovim

  • on linux/macos

    curl -L pixi.sh/install.sh | bash ########################################################################### then relaunch terminal
    pixi global install git nvim lazygit
    git clone --recursive https://github.com/yeferyv/retronvim ~/.config/retronvim
    NVIM_APPNAME=retronvim/nvim nvim
  • on Windows 10/11 (using powershell)

    winget install prefix-dev.pixi git.git neovim.neovim jesseduffield.lazygit microsoft.vcredist.2015+.x64 ##### then relaunch terminal
    git clone --recursive https://github.com/yeferyv/retronvim $env:LOCALAPPDATA/retronvim
    $env:NVIM_APPNAME=retronvim/nvim nvim
    [Environment]::SetEnvironmentVariable("PATH", "$env:PATH;C:\Program Files\Git\bin", "user") ################# add git-bash to path
    [Environment]::SetEnvironmentVariable("PATH", "$env:PATH;C:\Program Files\Git\usr\bin", "user") ############# add unix command to path

Install C compiler on Windows

  • Install msys2 C compiler

    winget install prefix-dev.pixi
    ~/appdata/local/pixi/bin/pixi global install gcc gxx
  • Install gnu C compiler

    set-executionpolicy remotesigned currentuser  # to allow script execution
    curl get.scoop.sh | iex                       # to install scoop
    scoop bucket add extras                       # to add more package repositories
    scoop install gcc
  • Install minGW C compiler

    winget install BrechtSanders.WinLibs.POSIX.UCRT.LLVM
    # scoop install mingw-winlibs-llvm-ucrt
  • Install Clang C compiler

    winget install MartinStorsjo.LLVM-MinGW.UCRT
    # pixi global install clang
  • Install microsoft C compiler gist tutorial youtube tutorial

    winget install Microsoft.VisualStudio.2022.BuilTools --force --override "--passive --wait --add Microsoft.VisualStudio.Workload.VCTools"
    [Environment]::SetEnvironmentVariable("PATH", "$env:PATH;C:\Program Files (x86)\Microsoft Visual Studio\2022\BuilTools\VC\Tools\MSVC\14.40.33807\bin\Hostx64\x64\cl.exe", "user") # PATH may change according to new version

Msys2's zsh support for Windows terminal

  • copy Retronvim's .zshrc to ~/.zshrc then add this to your settings.json (ctrl+shift+p then open settings file (JSON))

    "profiles":
    {
        "list":
        [
            {
                "commandline": "sh -c 'HOME=/c/Users/$(whoami); msys2.cmd -shell zsh -full-path'",
                "guid": "{00000000-0000-0000-ba54-000000000001}",
                "icon": "%USERPROFILE%/scoop/apps/msys2/current/msys2.ico",
                "name": "zsh (MSYS2)",
                "startingDirectory": "%USERPROFILE%"
            },
        ]
    },
  • tip: ctrl + shift + m to enter marks-mode (tmux-like copy mode)

  • alt+o (keymap to open yazi) outputs string sequences on yazi v0.2.5 but not in <= v0.2.4 only in Msys2's zsh

slow h, j, k, l workaround or wait until vscode supports webgpu

  • fix input latency/lag using GPU https://wiki.archlinux.org/title/AMDGPU https://wiki.archlinux.org/title/NVIDIA https://wiki.archlinux.org/title/Intel_graphics https://wiki.archlinux.org/title/PRIME

    pacman -S vulkan-intel vulkan-radeon amdvlk nvidia-utils # vulkan drivers
    pacman -S mesa                                           # opengl drivers
    pacman -S radeontop                                      # to view GPU usage
    DRI_PRIME=1 windsurf                                     # to enable GPU
    windsurf --status                                        # is opengl/vulkan enabled?
  • to view input latency https://github.com/microsoft/vscode/wiki/performance-issues ctrl+shift+p > Developer: Toggle Developer Tools > performance

  • alternatively disable GPU rendering

    windsurf --disable-gpu
    windsurf --status
  • alternative use zed

    pacman -S vulkan-intel
    pixi g install zed
  • alternatively add this to your keybindings.json, but it doesn't support <number>h,<number>j,<number>k,<number>l, and a extra fake space (e.g. r<fake space> will replace r<end of line>) is navigable at the end of line, and doesn't support replace mode containing hjkl combinations

    { "key": "h", "command": "cursorLeft",  "when": "editorTextFocus && (neovim.mode == 'normal' || vim.mode == 'Normal') && ( isLinux || isMac || isWindows)" },
    { "key": "j", "command": "cursorDown",  "when": "editorTextFocus && (neovim.mode == 'normal' || vim.mode == 'Normal') && ( isLinux || isMac || isWindows)" },
    { "key": "k", "command": "cursorUp",    "when": "editorTextFocus && (neovim.mode == 'normal' || vim.mode == 'Normal') && ( isLinux || isMac || isWindows)" },
    { "key": "l", "command": "cursorRight", "when": "editorTextFocus && (neovim.mode == 'normal' || vim.mode == 'Normal') && ( isLinux || isMac || isWindows)" }
  • a old workaround which supports replace mode (requires retronvim version <=0.2.0)

    {
      "key": "h",
      "command": "cursorLeft",
      "when": "editorTextFocus && !(neovim.fullMode =~ /^(f|r)/) && neovim.mode != 'insert' && neovim.mode != 'visual'"
    },
    {
      "key": "j",
      "command": "cursorDown",
      "when": "editorTextFocus && !(neovim.fullMode =~ /^(f|r)/) && neovim.mode != 'insert' && neovim.mode != 'visual'"
    },
    {
      "key": "k",
      "command": "cursorUp",
      "when": "editorTextFocus && !(neovim.fullMode =~ /^(f|r)/) && neovim.mode != 'insert' && neovim.mode != 'visual'"
    },
    {
      "key": "l",
      "command": "cursorRight",
      "when": "editorTextFocus && !(neovim.fullMode =~ /^(f|r)/) && neovim.mode != 'insert' && neovim.mode != 'visual'"
    },

gnh, gph not working on Windows10

  • disable cursorLeft, cursorDown, cursorUp, cursorRight (which were mapped to h, j, k, l for performance on Windows10 on retronvim version <=0.2.0). add this to your keybindings.json

    { "key": "h", "command": "-cursorLeft",  "when": "editorTextFocus && neovim.mode == 'normal' && ( isWindows || isWeb )" },
    { "key": "j", "command": "-cursorDown",  "when": "editorTextFocus && neovim.mode == 'normal' && ( isWindows || isWeb )" },
    { "key": "k", "command": "-cursorUp",    "when": "editorTextFocus && neovim.mode == 'normal' && ( isWindows || isWeb )" },
    { "key": "l", "command": "-cursorRight", "when": "editorTextFocus && neovim.mode == 'normal' && ( isWindows || isWeb )" }

install conda

  • with scoop using zsh (msys2), see: https://github.com/conda/conda/issues/9922 scoop insall mambaforge then add to your ~/.zshrc: eval "$('/c/path/to/miniconda3/Scripts/conda.exe' 'shell.zsh' 'hook' | sed -e 's/"$CONDA_EXE" $_CE_M $_CE_CONDA "$@"/"$CONDA_EXE" $_CE_M $_CE_CONDA "$@" | tr -d \x27\\r\x27/g')" then relaunch vscode and choose your virtual environment (view vscode statusbar and click to change)

  • with nixpkgs

    nix-env -iA nixpkgs.conda
    echo 'source $HOME/.conda/etc/profile.d/conda.sh' | tee -a ~/.bashrc -a ~/.zshrc | sh
    conda install --name base conda=24.3.0
    conda update conda

    then choose your virtual environment (view vscode statusbar and click to change)

  • with brew

    brew install mambaforge
    conda init

    then relaunch vscode and choose your virtual environment (view vscode statusbar and click to change)

  • cheatsheet: curl cht.sh/conda

pixi virtual environment

  • run pixi init to initialize a project then pixi add python to add dependencies then pixi shell on linux/mac/windows or pixi run zsh on msys2 to activate a virtual environment then launch code . then select the virtual environment (view vscode statusbar and click to change), then the python LSP (completion, diagnostics ...) for external libraries should work

  • alternatively in a new terminal run pixi init > pixi add python > pixi run zsh

  • RetroNvim already adds "python.defaultInterpreterPath": ".\\.pixi\\envs\\default\\python.exe" in settings.json as default virtual-environment/interpreter on Windows 10 if overwritten then manually choose the pixi virtual environment (view vscode statusbar and click to change) .\\.pixi\\envs\\default\\python.exe on windows and ./.pixi/envs/default/bin/python on linux/macos

  • cheatsheet: https://pixi.sh/latest/basic_usage https://code.visualstudio.com/docs/python/environments

additional chrome extensions: