map ^k
When a hits ctrl+k, the line on which the cursor currently is, is commented. To explain the command:
map ^k - assigns the functionality to ctrl+k character
I - Insert in the beginning of the line
/* - characters to be inserted
A - Append at the end of the line
*/ - characters to be appended
The Esc key can be typed by first typing Ctrl+V followed by Esc key.
By adding this mapping to .vimrc file, this mapping can be saved across vim invocations.
No comments:
Post a Comment