2

So, I'm new to VS code just installed it and I'm having an issue. The backspace doesn't work in the bash terminal of VS code. The backspace works on the cmd terminal of VS code though.

Not working means when I tap the backspace it prints a white space in the terminal.

Also the backspace key works perfectly fine on Git Bash

I tried googling but didn't find what I was looking for!

Please help.

2
  • Enter the following in terminal and check what happens: export TERM=xterm Commented Jun 10, 2020 at 17:59
  • Works for me on a bash integrated terminal in vscode. Does it do anything? Print some odd charachters? Commented Jun 10, 2020 at 23:50

2 Answers 2

3

You can check your TERM by running echo $TERM, but before you do this I suggest you restart your vscode as you have already set the TERM by using the command. I think your TERM was set to something incompatible.

export TERM=xterm will set the emulator to xterm.

Most application will expect that you already have the emulator set to something compatible such as xterm or linux.

For more information regarding what export TERM=xterm does you can check the following answer

Now, if you restart your vscode or terminal inside the vscode, TERM will reset to default and the problem will occur again. Therefore I suggest you add the export TERM=xterm in bash_profile or bashrc.

To add it to bashrc, type following in your terminal:

echo export TERM=xterm >> ~/.bashrc source ~/.bashrc 
Sign up to request clarification or add additional context in comments.

Comments

1

go to command palette and select open shortcut key words go to this file and delete all data in this file

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.