Completed coding for the COMMENT (F6) and UNCOMMENT (Shift-F6) functions.
COMMENT - pressing F6
| in a commented area | - no action |
| in a uncommented area wo/ selected text | - inserts ' at beginning of line |
| in a uncommented area w/ selected text | - brackets selected text with /* */ |
UNCOMMENT - pressing Shift F6
| in a uncommented area | - no action |
| current line has preceding ' | - removes ' |
| current line has no preceding ' | - removes first /* and */ before and after current position, respectively. |
Limitations:
Can not distinguish if ' is buried in a quote or is true comment marker.
Does not handle nested comment markers.
(These limitations may be addressed at a later date)
LarryMc
Note: Functions are also available from right-click context menu