14
votes

I set git-bash for windows as default terminal in Intellij IDEA. It works but I am unable to write tilde (~) character there (Shift+~). Tried changing different options in settings but without any luck.

versions: Windows 10
Intellij IDEA 2017.2.5
git version 2.14.2.windows.3
path to shell: "C:\Program Files (x86)\Git\bin\sh.exe" --login -i

Does anyone had similar problem and know the solution?

It is really annoying when I have to copy this character or work in seperate terminal in situation where direct view on code is preferable.

4
the closest jetbrains ticket is youtrack.jetbrains.com/issue/IDEA-152703 always open in 2020 - boly38

4 Answers

6
votes

Not really a solution, but probably a more convenient workaround: you can use ALT + 126 to print tilde character.

(while keep press Alt, on your keyboard type the number 126).

1
votes

I have the same issue. I accidentally clicked on 'F6' today and this added ~ in my console. It isn't resolve, but I guess that easier workaround.

0
votes

I solved this issue by enabling the keyboard type called eliminate dead keys. In my case it is Swedish and the keyboard type on Linux Elementary OS I'm using is called Swedish (eliminate dead keys).

It is available in other languages as well including Norwegian and German.

The disadvantage is that you cannot combine these to make characters anymore.

0
votes

I don't know the solution nor given in other answers work for me, so I will just share workaround I use. It's ugly, but better than copying tilde from other Window.

In ~/.bashrc file I added alias T='echo ~' (and invoked source ~/.bashrc after, to apply changes) so now everytime I need tilde I use $(T), for example ls $(T).

As other said upvoting this problem in youtrack may bring solution sooner or later - https://youtrack.jetbrains.com/issue/IDEA-152703