Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't edit files in Vscode

I've just started using Vscode and have a created a WebAPI project. On trying to open any of the default code files (Startup.cs and Program.cs) whatever I type starts to appear in the blue bar as shown below instead of where I have placed the cursor. I have no idea what's going on or what that blue bar is.

I am able to add my own code files and edit these as I would expect.

I'm running Vscode 1.29.1 on Win 10 on a Dell Latitude 12 7275. The vscode extension

screenshot

Enabled extensions :

Enabled extensions

like image 261
atamata Avatar asked Dec 06 '18 07:12

atamata


People also ask

How do you fix Cannot edit in read only editor in VS Code?

To fix that, instead of opening the file in diff view. Right-click on it and choose Open Changes > Open Previous Changes with Working File. This view will let you edit while comparing. Hope this helps.

Why my extension is not working in VS Code?

Views and more Actions click Disable All Installed Extensions then Enable All Extensions . Restart VSCode and it should be done; -) You can make sure again that the extensions are enabled.. Good Luck !

How do I enable Open editor code in Visual Studio?

If you already have one editor open, there are multiple ways of opening another editor to the side of the existing one: Alt click on a file in the Explorer. Ctrl+\ to split the active editor into two. Open to the Side (Ctrl+Enter) from the Explorer context menu on a file.


2 Answers

That's caused by Vim extension. Uninstall or disable it, otherwise use insert key on your keyboard to put it in insert mode.

like image 52
PersyJack Avatar answered Sep 23 '22 03:09

PersyJack


I'l leave this here for future readers

Basically, if I split files in tabs in VS Code, I could work with the files on the left hand side but could "read-only" all the files on the right hand side.

When I went to the extensions tabs I noticed that whatever I typed was being typed in the field in the extensions search bar. After deleting that, and clicking back on the "Files" tab, it went back to normal and can basically edit files on the both sides of my split screen.

  1. If cannot type
  2. Check where whatever you type is going (e.g. Extensions > Search bar)
  3. Delete wherever it's being typed, and click back on the "Files tab"
  4. Check if it works
like image 27
DUDANF Avatar answered Sep 22 '22 03:09

DUDANF