Closed bounceme closed 4 years ago
Please give me more details.
When you make a wrapped comment using a visual selection that isn't a full line,or is several lines where there is some unincluded text at either end,you can't unwrap that comment it seems. I've tried with both the gcuw and the gcuu maps in both visual and normal modes.
@bounceme I can't reproduce this. Please tell me the followings.
&filetype
while making a wrapped commentAnd sorry for delay to reply... ;(
I tried to reproduce in filetype=c
.
/* printf("hello\n"); */
printf("hello\n");
V
command.gcuw
Above steps change current buffer like below
printf("hello\n");
printf("hello\n");
the
gcuu
maps
Hm, what keymapping do you mean? caw.vim doesn't provide such default keymapping.
Hey, thanks for getting to this issue. you can use visual mode to select just the word "hello", then press "gcw" which comments out the selected word. The issue is that using any keycap from this plugin won't uncomment that word in the middle of the line.I don't really find this to be a very important problem though
Okay, now I understand.
I will implement gcuw
in a wrapped portion of a line.
[...]
is selected range.
int one_or_two = 1;
if (one_or_two == 1) {
} else [if (one_or_two == 2)] {
to
int one_or_two = 1;
if (one_or_two == 1) {
} else /* if (one_or_two == 2) */ {
In wrap comment and while normal-mode:
} else /* if (one_or_two == 2) */ {
to
} else if (one_or_two == 2) {
Concise example (from #84)
Typing <Plug>(caw:wrap:uncomment)
in comment string
int i = /* 1 ? 2 : */ 0;
results in
int i = 1 ? 2 : 0;
Typing <Plug>(caw:wrap:uncomment)
in comment string does not change anything.
int i = /* 1 ? 2 : */ 0;
Fixed in #118
The plugin can wrap some of a line from visual mode but can't uncomment it.