Uncomment each line in region. Remove ## or # in the first positions of a line. If the comment is not in the beginning position, this command will have no effect.
(self, event=None)
| 298 | return "break" |
| 299 | |
| 300 | def uncomment_region_event(self, event=None): |
| 301 | """Uncomment each line in region. |
| 302 | |
| 303 | Remove ## or # in the first positions of a line. If the comment |
| 304 | is not in the beginning position, this command will have no effect. |
| 305 | """ |
| 306 | head, tail, chars, lines = self.get_region() |
| 307 | for pos in range(len(lines)): |
| 308 | line = lines[pos] |
| 309 | if not line: |
| 310 | continue |
| 311 | if line[:2] == '##': |
| 312 | line = line[2:] |
| 313 | elif line[:1] == '#': |
| 314 | line = line[1:] |
| 315 | lines[pos] = line |
| 316 | self.set_region(head, tail, chars, lines) |
| 317 | return "break" |
| 318 | |
| 319 | def tabify_region_event(self, event=None): |
| 320 | "Convert leading spaces to tabs for each line in selected region." |
nothing calls this directly
no test coverage detected