You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very often I like to duplicate a block of code and comment out a copy.
For example,
foriinrange(2, 20:
print(i)
# for i in range(2, 20:# print(i)foriinrange(2, 20:
print(i)
Right now, I have to repeat a motion twice -- once to yank and once to comment out. And then of course I have to hit p to paste in the duplicate. It gets more complicated if I have to avoid clobbering my default register.
It would be nice to have this all rolled into one motion (that takes care of saving/restoring the registers).
Eg., gC" (or gyetc.) will behave just likegc`` but will paste a copy of the uncommented code next to the commented one.
Activity
gegoune commentedon Dec 5, 2021
Duplicate #70.
numToStr commentedon Dec 6, 2021
@jeetsukumaran This was already requested earlier. You should also follow #73 where I gave an example of how to achieve this :)
jeetsukumaran commentedon Dec 6, 2021
Thanks! Will do. And thanks for this plugin :)