VSCodeVim / VSCodeVim/Vim

VSCode set a flag to be used at `.vimrc`

Open
#4,858 0 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/neovim area/vimrc kind/enhancement
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Is your feature request related to a problem? Please describe.
Would be nice to have a flag passed (as a var for instance) to Vim/Neovim so that it could be used at .vimrc to skip some config (using in a if).
I couldn't find anything about this in docs.

Describe the solution you'd like
Set a flag somehow here where the Neovim process is started.
I tried something like this but didn't work, must be missing something.

this.process = spawn(configuration.neovimPath, ['-u', 'NONE', '-i', 'NONE', '-n', '--embed', '--cmd', '"let g:vscode=1"'], {
    cwd: dir,
});

In the terminal I can do that: nvim --cmd "let g:vscode=1"

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 at src/neovim/neovim.ts around line 94, where the Neovim process is started, and inspect how its startup arguments are assembled. The change is complete when the embedded Neovim instance exposes a flag or variable that a user's .vimrc can test to skip configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.