Home Explore Blog CI



neovim

2nd chunk of `runtime/doc/insert.txt`
0ecde25e4cf1e8e277c0f4c125d46e088d070e242b2692c30000000100000fa0
 joining lines.
						*i_CTRL-U-default*
		By default, sets a new undo point before deleting.
		|default-mappings|
						*i_CTRL-I* *i_<Tab>* *i_Tab*
<Tab> or CTRL-I Insert a tab.  If the 'expandtab' option is on, the
		equivalent number of spaces is inserted (use CTRL-V <Tab> to
		avoid the expansion; use CTRL-Q <Tab> if CTRL-V is mapped
		|i_CTRL-Q|).  See also the 'smarttab' option and
		|ins-expandtab|.
						*i_CTRL-J* *i_<NL>*
<NL> or CTRL-J	Begin new line.
						*i_CTRL-M* *i_<CR>*
<CR> or CTRL-M	Begin new line.
						*i_CTRL-K*
CTRL-K {char1} [char2]
		Enter digraph (see |digraphs|).  When {char1} is a special
		key, the code for that key is inserted in <> form.  For
		example, the string "<S-Space>" can be entered by typing
		<C-K><S-Space> (two keys).  Neither char is considered for
		mapping.

CTRL-N		Find next keyword (see |i_CTRL-N|).
CTRL-P		Find previous keyword (see |i_CTRL-P|).

CTRL-R {register}				*i_CTRL-R*
		Insert the contents of a register.  Between typing CTRL-R and
		the second character, '"' will be displayed to indicate that
		you are expected to enter the name of a register.
		The text is inserted as if you typed it, but mappings and
		abbreviations are not used.  If you have options like
		'textwidth', 'formatoptions', or 'autoindent' set, this will
		influence what will be inserted.  This is different from what
		happens with the "p" command and pasting with the mouse.
		Special registers:
			'"'	the unnamed register, containing the text of
				the last delete or yank
			'%'	the current file name
			'#'	the alternate file name
			"*"	the clipboard contents (X11: primary selection)
			'+'	the clipboard contents
			'/'	the last search pattern
			':'	the last command-line
			'.'	the last inserted text
							*i_CTRL-R_-*
			'-'	the last small (less than a line) delete
				register. This is repeatable using |.| since
				it remembers the register to put instead of
				the literal text to insert.
							*i_CTRL-R_=*
			'='	the expression register: you are prompted to
				enter an expression (see |expression|)
				Note that 0x80 (128 decimal) is used for
				special keys.  E.g., you can use this to move
				the cursor up:
					CTRL-R ="\<Up>"
				Use CTRL-R CTRL-R to insert text literally.
				When the result is a |List| the items are used
				as lines.  They can have line breaks inside
				too.
				When the result is a Float it's automatically
				converted to a String.
				When append() or setline() is invoked the undo
				sequence will be broken.
		See |registers| about registers.

CTRL-R CTRL-R {register}			*i_CTRL-R_CTRL-R*
		Insert the contents of a register.  Works like using a single
		CTRL-R, but the text is inserted literally, not as if typed.
		This differs when the register contains characters like <BS>.
		Example, where register a contains "ab^Hc": >
	CTRL-R a		results in "ac".
	CTRL-R CTRL-R a		results in "ab^Hc".
<		Options 'textwidth', 'formatoptions', etc. still apply.  If
		you also want to avoid these, use CTRL-R CTRL-O, see below.
		The '.' register (last inserted text) is still inserted as
		typed.
		After this command, the '.' register contains the text from
		the register as if it was inserted by typing it.

CTRL-R CTRL-O {register}			*i_CTRL-R_CTRL-O*
		Insert the contents of a register literally and don't
		auto-indent.  Does the same as pasting with the mouse
		|<MiddleMouse>|. When the register is linewise this will
		insert the text above the current line, like with `P`.
		The '.' register (last inserted text) is still inserted as
		typed.
		After this command, the '.' register contains the command
		typed and not the text. I.e., the literals "^R^O" and not the
		text from the register.
		Does not replace characters in |Replace-mode|!

CTRL-R CTRL-P {register}			*i_CTRL-R_CTRL-P*
		Insert the contents of a register literally and fix the
		indent, like |[<MiddleMouse>|.
		The '.' register (last inserted text) is still inserted as
		typed.
		After this command, the '.' register

Title: Vim Insert Mode: Special Keys Continued - Registers and Digraphs
Summary
This section continues the explanation of special keys in Vim's Insert mode, focusing on inserting tabs, newlines, and digraphs. It extensively covers the use of CTRL-R to insert the contents of various registers, including special registers like the unnamed register, file names, clipboard contents, and search patterns. It details how to insert register contents as if typed, literally, or with fixed indentation, and notes the impact on the '.' register (last inserted text) in each case.