What does <c-r>= means in Vim
Solution 1:
<C-r>=
, or Ctrl+R= is used to insert the result of an expression at the cursor.
I use it a lot when editing CSS to insert values:
width: <C-r>=147-33<CR>px;
width: 114px;
EDIT
<C-r>
, without =
, allows you to insert the content of any register at the cursor while staying in insert mode: <C-r>+
, for example, inserts the content of my system clipboard. see :help i_ctrl_r
.
=
is the "expression register". See :help "=
.
ENDEDIT
Solution 2:
<C-r>
is like doing CTRL+R on the keyboard. <CR>
is like hitting enter. You can find the full list by doing :help key-notation
.