bug#81342: [PATCH] viper-cmd: Simplify quoting by using comment-region
Sean Whitton <[email protected]> Wed, 05 Aug 2026 13:42:21 +0100
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Message-ID | <[email protected]> |
Joshua Murphy [23/Jul 8:07pm GMT] wrote: >> Have you looked at Evil and >> its most popular extensions? > > From what I can tell, there are two popular packages for Evil that add > commenting functionality: Evil Nerd Commenter [1] and Evil Commentary [2]. > Both are based on existing Vim scripts. > > Evil Nerd Commenter adds a comment text object. Viper doesn't really > have a concept of text objects, but if it did that'd probably be the more > "correct" or Vim-like solution. It also adds a prefix with comma, so you could > do ,,9j to comment out the next 9 lines, ,,w for commenting > the next word, etc. The prefix could be done in Viper, although Viper > already has a binding for comma, so that's problematic. But maybe we could do double-comma? Is that compatible with Viper's existing use of commas? > Evil Commentary uses gc as its prefix. An example is gcw to comment > out a word. Viper kind-of has a default bind for g. Viper's > documentation suggests to set viper-buffer-search-char to g, but it > isn't bound in the keymap by default. I'm not sure how difficult it'd > be to extend it to support the gc prefix while still keeping the > buffer searching. I think it's worth investigating this possibility further, too. -- Sean Whitton