VSCodeVim/Vim

Implement tcomment instead of vim-commentary (specifically commenting text objects)

Open

#2.242 geöffnet am 23. Dez. 2017

Auf GitHub ansehen
 (0 Kommentare) (8 Reaktionen) (0 zugewiesene Personen)TypeScript (1.271 Forks)batch import
help wantedkind/feature

Repository-Metriken

Stars
 (12.664 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 60T 20h) (17 gemergte PRs in 30 T)

Beschreibung

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


Is this a BUG REPORT or FEATURE REQUEST? (choose one): Feature Request

I've switched to tcomment over vim-commentary for a few different reasons:

  1. Commenting in JSX (this is actually already implemented in VSCodeVim, it doesn't work very well in the original vim-commentary implementation)
  2. More flexible commenting with movements and text objects.

Consider the following:

function foo(bar: string): string {
  return 'bar';
}

If I have my cursor on the b of bar and press gci(, vim-commentary will produce the following:

//function foo(bar: string): string {
  return 'bar';
}

tcomment, on the other hand, will produce the following:

function foo(/*bar: string*/): string {
  return 'bar';
}

VSCodeVim currently implements the vim-commentary functionality, I would argue that the tcomment functionality is much better.

Contributor Guide