Solving a vim Code

  question, vim

How does this line of code work?

imap <C-L> @@@<esc>hhkywjl? @@@<CR>P/@@@<cr>3s

This is a mapping of insert mode. It seems that the purpose is to copy a word above the cursor to the current position.
The general principle is this:

  • @@@This is actually a place holder. It is convenient for the following two positioning (? And/). After understanding this, the rest …

  • hhkMove the cursor into the upper word

  • ywCopy

  • PPaste above the current line, that is, the line where the cursor was originally located.

  • 3sIs to delete the three@@@

The rest will not be explained one by one.