vim annotates as much as a certain range

Asked 1 years ago, Updated 1 years ago, 77 views

I want to know how to annotate as much as a specific range in vim. It's so hard to keep adding # one by one.

This is

def my_fun(x, y):
    return x + y

Like this

#def my_fun(x, y):
#    #    return x + y

You can use either # or " as long as you comment.

python vim editor

2022-09-22 08:57

2 Answers

alt text

alt text

Right now, only one line is annotated, but 4 is completely annotated

alt text

alt text


2022-09-22 08:57

map  gc  <Plug>Commentary
nmap gcc <Plug>CommentaryLine


2022-09-22 08:57

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.