|x| N x delete N characters under and after the cursor
|<Del>| N <Del> delete N characters under and after the cursor
|X| N X delete N characters before the cursor
|d| N d{motion} delete the text that is moved over with {motion}
|v_d| {visual}d delete the highlighted text
|dd| N dd delete N lines
|D| N D delete to the end of the line (and N-1 more lines)
|J| N J join N-1 lines (delete <EOL>s)
|v_J| {visual}J join the highlighted lines
|gJ| N gJ like "J", but without inserting spaces
|v_gJ| {visual}gJ like "{visual}J", but without inserting spaces
|:d| :[range]d [x] delete [range] lines [into register x]
------------------------------------------------------------------------------
*Q_cm* Copying and moving text
|quote| "{char} use register {char} for the next delete, yank, or put
|:reg| :reg show the contents of all registers
|:reg| :reg {arg} show the contents of registers mentioned in {arg}
|y| N y{motion} yank the text moved over with {motion} into a register
|v_y| {visual}y yank the highlighted text into a register
|yy| N yy yank N lines into a register
|Y| N Y yank N lines into a register
Note: Mapped to "y$" by default. |default-mappings|
|p| N p put a register after the cursor position (N times)
|P| N P put a register before the cursor position (N times)
|]p| N ]p like p, but adjust indent to current line
|[p| N [p like P, but adjust indent to current line
|gp| N gp like p, but leave cursor after the new text
|gP| N gP like P, but leave cursor after the new text
------------------------------------------------------------------------------
*Q_ch* Changing text
|r| N r{char} replace N characters with {char}
|gr| N gr{char} replace N characters without affecting layout
|R| N R enter Replace mode (repeat the entered text N times)
|gR| N gR enter virtual Replace mode: Like Replace mode but
without affecting layout
|v_b_r| {visual}r{char}
in Visual block mode: Replace each char of the
selected text with {char}
(change = delete text and enter Insert mode)
|c| N c{motion} change the text that is moved over with {motion}
|v_c| {visual}c change the highlighted text
|cc| N cc change N lines
|S| N S change N lines
|C| N C change to the end of the line (and N-1 more lines)
|s| N s change N characters
|v_b_c| {visual}c in Visual block mode: Change each of the selected
lines with the entered text
|v_b_C| {visual}C in Visual block mode: Change each of the selected
lines until end-of-line with the entered text
|~| N ~ switch case for N characters and advance cursor
|v_~| {visual}~ switch case for highlighted text
|v_u| {visual}u make highlighted text lowercase
|v_U| {visual}U make highlighted text uppercase
|g~| g~{motion} switch case for the text that is moved over with
{motion}
|gu| gu{motion} make the text that is moved over with {motion}
lowercase
|gU| gU{motion} make the text that is moved over with {motion}
uppercase
|v_g?| {visual}g? perform rot13 encoding on highlighted text
|g?| g?{motion} perform rot13 encoding on the text that is moved over
with {motion}
|CTRL-A| N CTRL-A add N to the number at or after the cursor
|CTRL-X| N CTRL-X subtract N from the number at or after the cursor
|<| N <{motion} move the lines that are moved over with {motion} one
shiftwidth left
|<<| N << move N lines one shiftwidth left
|>| N >{motion} move the lines that are moved over with {motion} one
shiftwidth right
|>>| N >> move N lines one shiftwidth right
|gq| N gq{motion} format the lines that are moved over with {motion} to
'textwidth' length
|:ce| :[range]ce[nter] [width]
center the lines in [range]
|:le| :[range]le[ft] [indent]
left-align the lines in [range] (with [indent])
|:ri| :[range]ri[ght] [width]
right-align the lines in [range]
------------------------------------------------------------------------------
Title: Nvim Quick Reference: Deleting, Copying, Moving and Changing Text
Summary
This section details commands for deleting (x, <Del>, X, d, dd, D, J, :d), copying (registers, :reg, y, yy, Y), and moving text (p, P, ]p, [p, gp, gP) in Nvim. It covers changing text, including replacing characters (r, gr, R, gR), changing text with motion (c, cc, C, s), switching case (~, u, U), rot13 encoding (g?), and incrementing/decrementing numbers (CTRL-A, CTRL-X). It also includes commands for shifting lines left or right (<, >, <<, >>), formatting lines (gq), and aligning text (:ce, :le, :ri).