When I repeatedly inserting at the beginning of a line it is problematic because the cursor ends up in the middle of the line so I have to move back to the beginning of the line each time. So, for example, if I am commenting lines then might do something like i##_<ESC> to comment the line, then I have to do j^ to get back to the beginning of the next line before pressing dot to do a repeat.
Is there any way to simplify this? In particular I don't like having to type the hat to get to the beginnning of the line.
i inserts before the cursor.
If the cursor is in column 1, then before the cursor also happens to be at beginning of line, but this is accidental.
Repeating a change that begins with i will always insert before the cursor, but not always at the beginning of line.
For repeated changes to insert at beginning of line you must make "beginning of line" part of the change that is repeated.
I inserts at the beginning of a line.
The command I##_<Esc> inserts "##_" at beginning of line, not before the cursor.
(If the cursor is in column 1, then beginning of line also happens to be before the cursor, but this is accidental.)
This change can be repeated with . and will always insert at beginning of line.
<c-v>at the start of the first line, select till the last line, then
^key is too far,
0will also move to the beginning of the line.