Implement tcomment instead of vim-commentary (specifically commenting text objects)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
- 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:
- Commenting in JSX (this is actually already implemented in VSCodeVim, it doesn't work very well in the original
vim-commentaryimplementation) - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing VSCodeVim implementation of vim-commentary behavior and its text-object handling, then compare it with tcomment's documented behavior. Verify the change against the examples in the issue, including gci( producing an inline comment around the selected text, while preserving existing JSX commenting behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100