ryanluker / vscode-coverage-gutters

Display test coverage generated by lcov and xml - works with many languages
https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters
MIT License
460 stars 88 forks source link

Keybinding to show coverage overrides default toggle comment block binding #88

Closed valpet closed 7 years ago

valpet commented 7 years ago

The keybinding shift+cmd+7 that is the default keybinding for toggling comment block is overridden by the show coverage keybinding. Setting a custom keybinding works as a workaround but that should not be necessary. I'd be happy if you could change the hotkey for show coverage.

ryanluker commented 7 years ago

thanks for submitting an issue @valpet . I used the keyboard shortcut references here https://code.visualstudio.com/docs/getstarted/keybindings#_keyboard-shortcuts-reference before choosing the 5 keybindings that are associated with the current features so i am not sure how a conflict came about. Which keybinding exactly was the one in conflict, as the toggling comment block bindings is

{
  "command": "editor.action.blockComment",
  "key": "shift+alt+a",
  "when": "editorTextFocus && !editorReadonly"
}

based on my defaults ?

valpet commented 7 years ago

Excuse my poor choice of word, it's the Toggle Line Comment // ... that got overridden for me, not the block / ... /

Original:

  { "key": "shift+cmd+7",
    "command": "editor.action.commentLine",
    "when": "editorTextFocus && !editorReadonly" },

Conflicting:

  { "key": "shift+cmd+7",
    "command": "extension.displayCoverage",
    "when": "config.coverage-gutters.customizable.keybindings-displayCoverage-enabled" 
},

Perhaps worth mentioning (but not sure if that matters) is that I'm on Swedish keyboard where the / character is mapped to the key shift+7. Maybe this is only an issue for people with Swedish keyboard mappings?

ryanluker commented 7 years ago

thanks for the additional info @valpet I will take a look into switching the default from 7 to maybe something else. Although I can see this just being an issue in general as there might not be a key combo that does not conflict across every keyboard layout.

ryanluker commented 7 years ago

@valpet vscode has a new feature recently https://code.visualstudio.com/docs/getstarted/keybindings#_detecting-keybinding-conflicts that helps with fixing conflicting keyboard shortcuts. Also given that each language could have its own conflicts (as you mentioned) I will close this ticket but thanks for bringing this to my attention, I will make sure to have all future keybindings be customizable as I do now!