VsCode VIM - How to open "New Untitled File"

7.5k views Asked by At

In VsCode VIM (vanilla installation), how would you execute Ctrl + N? When inspecting the keyboard shortcut, it looks like this:

enter image description here

I tried the plain way in VIM by running :new, but it opened a new tab within the same editor instead of a whole new tab.

Ideally, I'm looking for a plain way to do this without having to re-map any keys. I'm a big proponent of using vanilla tooling so I can easily transfer machine without having to carry around my re-mappings.

3

There are 3 answers

1
D. Ben Knoble On BEST ANSWER

In vim, I use :enew to start a brand new file.

2
pho mai On

You can try :e

Example

:e test.js

Or install extension like this : https://github.com/dkundel/vscode-new-file

0
Ros Sokcheanith On

In --NORMAL--
:e or :enew then press enter.
This will create new and open a new file tap.