From e159041e417a929918188024e6e3e03b402c1683 Mon Sep 17 00:00:00 2001 From: Archaoss <78039432+Archaoss@users.noreply.github.com> Date: Sat, 21 Sep 2024 15:15:51 +0200 Subject: [PATCH 1/5] Update commentary.vim to use leader --- plugin/commentary.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugin/commentary.vim b/plugin/commentary.vim index ed056a4..a8df5fa 100644 --- a/plugin/commentary.vim +++ b/plugin/commentary.vim @@ -110,11 +110,11 @@ onoremap Commentary :call textobject(get(v:, 'op nnoremap ChangeCommentary c:call textobject(1) if !hasmapto('Commentary') || maparg('gc','n') ==# '' - xmap gc Commentary - nmap gc Commentary - omap gc Commentary - nmap gcc CommentaryLine - nmap gcu CommentaryCommentary + xmap c Commentary + nmap c Commentary + omap c Commentary + nmap cc CommentaryLine + nmap cu CommentaryCommentary endif nmap CommentaryUndo :echoerr "Change your CommentaryUndo map to CommentaryCommentary" From bf89dc3c0477fef2a503be4ed68700af341e7f7a Mon Sep 17 00:00:00 2001 From: Archaoss <78039432+Archaoss@users.noreply.github.com> Date: Sat, 21 Sep 2024 15:18:56 +0200 Subject: [PATCH 2/5] Update README.markdown --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 328ae97..88ecd18 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,4 @@ -# commentary.vim +# commentary.vim forked from tpope/vim-commentary to use leader key instead of g Comment stuff out. Use `gcc` to comment out a line (takes a count), `gc` to comment out the target of a motion (for example, `gcap` to From 810e2cbacad9b5432a0cb16174f5cf61db92d35c Mon Sep 17 00:00:00 2001 From: Erwan Privat Date: Sat, 31 May 2025 15:55:30 +0200 Subject: [PATCH 3/5] Revert "Update README.markdown" This reverts commit bf89dc3c0477fef2a503be4ed68700af341e7f7a. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 88ecd18..328ae97 100644 --- a/README.markdown +++ b/README.markdown @@ -1,4 +1,4 @@ -# commentary.vim forked from tpope/vim-commentary to use leader key instead of g +# commentary.vim Comment stuff out. Use `gcc` to comment out a line (takes a count), `gc` to comment out the target of a motion (for example, `gcap` to From aca415f04b28ee001d61a9c02c087dccac113210 Mon Sep 17 00:00:00 2001 From: Erwan Privat Date: Sat, 31 May 2025 15:57:56 +0200 Subject: [PATCH 4/5] updated README with leader --- README.markdown | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.markdown b/README.markdown index 328ae97..a177db4 100644 --- a/README.markdown +++ b/README.markdown @@ -1,9 +1,9 @@ # commentary.vim -Comment stuff out. Use `gcc` to comment out a line (takes a count), -`gc` to comment out the target of a motion (for example, `gcap` to -comment out a paragraph), `gc` in visual mode to comment out the selection, -and `gc` in operator pending mode to target a comment. You can also use +Comment stuff out. Use `cc` to comment out a line (takes a count), +`c` to comment out the target of a motion (for example, `cap` to +comment out a paragraph), `c` in visual mode to comment out the selection, +and `c` in operator pending mode to target a comment. You can also use it as a command, either with a range like `:7,17Commentary`, or as part of a `:global` invocation like with `:g/TODO/Commentary`. That's it. @@ -13,7 +13,7 @@ feature (I overlooked [tcomment.vim](https://github.com/tomtom/tcomment_vim)). Striving for minimalism, it weighs in at under 100 lines of code. -Oh, and it uncomments, too. The above maps actually toggle, and `gcgc` +Oh, and it uncomments, too. The above maps actually toggle, and `cc` uncomments a set of adjacent commented lines. ## Installation From edea8f828cae5a2b7d9d990f1cfe2db8841d4797 Mon Sep 17 00:00:00 2001 From: Erwan Privat Date: Sat, 31 May 2025 17:22:59 +0200 Subject: [PATCH 5/5] fix maparg missing leader replacement --- plugin/commentary.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/commentary.vim b/plugin/commentary.vim index 41e1fde..19bc229 100644 --- a/plugin/commentary.vim +++ b/plugin/commentary.vim @@ -109,7 +109,7 @@ nnoremap CommentaryLine go() . '_' onoremap Commentary :call textobject(get(v:, 'operator', '') ==# 'c') nnoremap ChangeCommentary c:call textobject(1) -if !hasmapto('Commentary') || maparg('gc','n') ==# '' +if !hasmapto('Commentary') || maparg('c','n') ==# '' xmap c Commentary nmap c Commentary omap c Commentary