Hello,
I heavily comment my sources, mostly by placing a "// ..." comment at the end of the line. While this has saved me many times trying to understand what I meant in my code a decade ago, it does take time. I don't mind typing the comments, but a relatively huge part of my life is spent on the following dumb and repetitive task:
- bring the cursor just in front of the last "//" in the line
- press the spacebar as many times as necessary to bring the end of the comment into a predefined position.
The first of the two phases is particularly painful: since Ctrl-Left/Right IGNORES "//"s, it usually involves a horrendously long series of Ctrl-Left/Rights followed by plain Left/Rights to get the cursor just in front of the last "//" in the line. When you talk about several millions of lines needing that, you realize the staggering waste of time.
I would like to do the above two bullets in a single stroke, say "Ctrl-Shift-/" - is there a way to define an editor macro to that purpose in 10.1 Berlin?
Many thanks for your help!
P.S. To give you the perspective: spending just 5 seconds on the two bullets on ten million lines (and I've already written far more than that) yields nearly two years of my life spent just chasing and pushing the "//"s! :-O :-O I don't even dare to imagine how much actual code I could have written in those two years...
--------------
47 views and no reply yet, slightly surreal... BUT here is a followup:
In the Options -> Editor Options -> Key Mappings, there is a list of "Enhancement modules", and the Help says "You can create enhancement modules that contain new keystrokes [...]" I would be more than willing to spend the time to define the keystroke above (and share it with you all), but I have no idea HOW to "create an enhancement module", and I can't seem to find any information on that in the Help.
Any suggestions where to look?
Thanks!