VSCodeVim / VSCodeVim/Vim

Is it possible to check if it is VSCode in .vimrc?

Open
#8,526 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

I'd like to import .vimrc using vim.vimrc.enable: true, but skip some mappings to be imported.

Is it possible to know if it is imported from VSCode inside .vimrc like this?

if (g:is_vscode == 1)
    " do nothing
else
    nnoremap ...
endif

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the vim.vimrc.enable setting imports .vimrc and how VSCodeVim exposes extension state to Vimscript. Confirm whether a supported indicator can be provided for conditional mappings; done means documenting the available approach or establishing that this detection is not supported.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim, vscode
Domain
developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.