You can repeat the last inserted text in insert mode using CTRL-R .
or CTRL-A
But you need to leave insert mode to complete the change. Type Enter insert mode and type
table[row][col]
Then leave insert mode and re-enter using Esca and type the rest of the line before the repeated part
table[row][col] = std::max(
Finally, type CTRL-R .
(or CTRL-A
)
table[row][col] = std::max(table[row][col]
and finish the line.
A shortcut for the above is CTRL-A.