VSCodeVim / VSCodeVim/Vim

split with new file name doesn't open empty buffer

Open
#3,736 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
:vs new_file_name.cc opens copy of current tab if new_file_name.cc doesn't exist

To Reproduce
Steps to reproduce the behavior:

  1. Open any file in project folder
  2. :vs new_file_name.cc where new_file_name.cc doesn't exist
  3. VS Code complains about non-existing file and opens new tab with copy of current buffer

Expected behavior
In vim this opens new empty buffer which exists only in memory and will be saved as new_file_name.cc after you run :w

Screenshots
Error message and copy of existing buffer in VS Code:
image
New unsaved buffer in gvim:
image

Environment (please complete the following information):

  • Issue Type: Bug
  • Extension Name: vim
  • Extension Version: 1.7.1
  • OS Version: Linux x64 4.15.0-47-generic
  • VSCode version: 1.33.1
{
	"messages": [],
	"activationTimes": {
		"startup": true,
		"codeLoadingTime": 383,
		"activateCallTime": 1,
		"activateResolvedTime": 137,
		"activationEvent": "*"
	},
	"runtimeErrors": []
}

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 reproducing :vs new_file_name.cc in the VSCode Vim extension and compare it with Vim's behavior. Trace how the split command handles a path that does not exist; done means it opens an empty in-memory buffer and saves it under new_file_name.cc with :w.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.