The simplest is to use a search and replace regular expression, for example,
- Cmd - Opt - f
- Select an option . * (Regular expression)
- Find what:
^#.*\n Note 1 - Replace with: (nothing)
This will not work for comment blocks. For them you need to be a little more complicated, (very) roughly:
=begin(.|\n)*=end
(not verified safely.)
If you do this a lot (which IMO is a little strange), you can bind it to a key.
Note 1: This works for comments at the beginning of lines. It does not add comments to lines of code; if you want to handle this, you can remove ^ , but you will need something about EOLs that will disappear during replacement. Or you can just ignore EOL and have some empty lines where there were line comments.
source share