zed icon indicating copy to clipboard operation
zed copied to clipboard

Emulate vim-commentary

Open Un1q32 opened this issue 1 year ago • 1 comments

Check for existing issues

  • [X] Completed

Describe the feature

When vim mode is enabled, gcc should comment/uncomment the selected line, and in visual mode gc should comment/uncomment all selected lines and then deselect. The VS Code vim plugin did this and I miss it.

If applicable, add mockups / screenshots to help present your vision of the feature

No response

Un1q32 avatar Jan 29 '24 05:01 Un1q32

Hey there! I have the following in my keymap.json (because I missed that functionality too) and it works pretty well for me:

  {
    "context": "Editor && vim_mode == normal",
    "bindings": {
      "g c c": "editor::ToggleComments"
    }
  },
  {
    "context": "Editor && vim_mode == visual",
    "bindings": {
      "g c": "editor::ToggleComments"
    }
  },

mrnugget avatar Jan 29 '24 08:01 mrnugget

That's good enough for me

Un1q32 avatar Jan 30 '24 18:01 Un1q32