I use Vim to write my Python source and use the debugging library
Let's say I have this code with break points commented out:
import pdb #pdb.set_trace() def func1(): #pdb.set_trace() foo_bar
I then want to globally un-comment all the
Also, I'll want to re-comment them.
I figured out how to search for the commented string:
After this I don't know how to build a string of commands that would globally find the string and add a
# to the beginning of the string so as not to mess up the indentation.
I realized that I need to not re-comment lines with an existing
# so I
built upon the accepted answer:
To comment out: