Vscode-gitlens: Cannot type backslash after installing "Git lens"

Created on 18 Apr 2017  Â·  18Comments  Â·  Source: eamodio/vscode-gitlens

  • GitLens Version: 3.4.5
  • VSCode Version: 1.11.2
  • OS Version: MacOS Sierra 10.12.3

Steps to Reproduce:

  1. Install Git Lens
  2. Open a file under a git repo
  3. Type \ at any line

Expected behavior: \ is written
Actual behavior: \ is not written

needs more info

Most helpful comment

Yeah, this has been a long standing issue and I will make the change to make the chorded set the default -- since it was "designed" to not conflict with any normal typing.

Yeah, you can definitely just remove any conflicting binding manually, or just switch GitLens to use a different keybinding set (or no set if you want to control it all manually)

All 18 comments

@mdelapenya I can't reproduce this, nor can I fathom how GitLens could effect this -- do you have some key configuration setup for \?

No, but I uninstall the plugin and everything works as expected.

Let me grab the computer and send my plugins​ list

Is there anything else special about you setup? Do you have any customize key commands for GitLens?

No, I don't have any special key command.

The top header info message appears just hitting \ with GitLens enabled.

Here it is a capture of my plugins:

screen shot 2017-04-18 at 19 25 19

@mdelapenya I'm really at a loss here. Do you have any special keyboard layout or app (like karabiner or something?)? And you definitely don't have any occurrences of gitlens in your keybindings.json file?

If you open the GitLens extension and switch to the Contributions "tab" do you see \ listed?

Hey @eamodio, I'm sorry to say no to all, no keyboard layout here nor gitlens contribution 😢
screen shot 2017-04-19 at 08 48 51
screen shot 2017-04-19 at 08 49 07

@mdelapenya hrm. I still have no clue how this could happen. Are you on a US keyboard layout? What other else is on your \ key? I'm actually on vacation this week so I won't really be able to do much more until next week. Maybe we can screen share or something

I'm using Spanish keyboard.

Yeah, we can do that once you are back

Thanks!

@mdelapenya can you take a screenshot of the command palette if you type GitLens into it (with an open editor for a file in a git repo). I want to see what vscode thinks the keybindings are since they should show up there. Can you also take a screenshot of the GitLens contributions page (in vscode) -- make sure to scroll down to the Commands section (that also will show the keybindings).

I'm not sure if it is related, but I've found these vscode issues that could be related:
https://github.com/Microsoft/vscode/issues/4084
https://github.com/Microsoft/vscode/issues/14984
https://github.com/Microsoft/vscode/issues/23386

Hi Eric, here I attach the screenshots:

Command palette

command palette

Commands contributions

screen shot 2017-04-27 at 09 22 07
screen shot 2017-04-27 at 09 22 26
screen shot 2017-04-27 at 09 22 44
screen shot 2017-04-27 at 09 23 06

@mdelapenya can you try the new beta here: v3.5.0-beta? You can find installation instructions here: Installing Beta Releases

I'm still very much at a loss to how this is happening, but there have been quite a lot of changes in the latest version and with any luck maybe it will help.

Hey @eamodio, with 3.5.0-beta it works as expected!

Thank you very much for your work here :)

Closing...

Excellent! Thank you for your patience!

Same error with GitLens 8.0.2 using Swedish layout on mac. Trying to do backslash will just output the git search box. It's weird that the default keyboard layout for GitLens would override the default backslash binding for macs. ALT+SHIFT+7.

Please open the GitLens settings (run GitLens: Open Settings from the command palette) and jump to Keyboard Shortcuts and change to either the chorded set or custom set.

In the next GitLens release, I am thinking about switching to the chorded set by default to avoid these issues

@eamodio
I agree that overlapping shorthand-conflicts should be handled by visual studio code. But for me, as well as @nuttmeister it's taking precedence over regular character input (i.e. for the __ character on a Swedish keyboard layout. I'm guessing since this is not a shortcut, it's not detected as a conflict by visual studio code.

@nuttmeister My solution for now is to add these lines to keybindings.json:

{ "key": "shift+alt+7", "command": "-gitlens.showCommitSearch", "when": "gitlens:enabled" }

Yeah, this has been a long standing issue and I will make the change to make the chorded set the default -- since it was "designed" to not conflict with any normal typing.

Yeah, you can definitely just remove any conflicting binding manually, or just switch GitLens to use a different keybinding set (or no set if you want to control it all manually)

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mindpivot picture mindpivot  Â·  4Comments

ridhwaans picture ridhwaans  Â·  3Comments

batjko picture batjko  Â·  4Comments

derrickstolee picture derrickstolee  Â·  3Comments

JP-Ellis picture JP-Ellis  Â·  3Comments