How do I replace a visual selection with yanked text without losing my clipboard?
When you paste over a visual selection with p, Vim replaces the selection with the register contents — but it also puts the deleted selection into the unnamed
category:
visual-mode
tags:
#visual-mode
#registers
#paste
#workflow
What is the difference between register 0 and register 1 in Vim?
Register 0 always contains the last yanked text.
category:
registers
tags:
#registers
#numbered
#difference
How do you paste over a visual selection without losing the register?
When pasting over a selection, the replaced text overwrites the unnamed register.
category:
registers
tags:
#registers
#paste
#selection
How do I always access my last yanked text regardless of deletes?
Register 0 (the yank register) always contains the text from your most recent yank command — and unlike the unnamed register, it is never overwritten by delet
category:
registers
tags:
#registers
#paste
#yank
#workflow
How do I replace a visual selection with yanked text in Vim?
In visual mode, pressing p replaces the selected text with the contents of the default register.
category:
visual-mode
tags:
#visual-mode
#editing
#registers
#normal-mode
How do I recover the last small deletion without disrupting my numbered registers?
Vim silently stores every deletion of less than one line in the special "- register (the "small delete" register).
category:
registers
tags:
#registers
#editing
#normal-mode
How do I swap a word with the contents of a register using visual mode?
The viwp command visually selects the word under the cursor and replaces it with the contents of the unnamed register (your last yank or delete).
category:
visual-mode
tags:
#editing
#visual-mode
#registers
#paste
#productivity
How do I paste text below the current line?
The p command pastes (puts) the contents of the default register after the cursor.
category:
editing
tags:
#editing
#registers
#normal-mode
How do I open a new empty buffer in a horizontal split without opening any file?
n creates a new empty buffer and opens it in a horizontal split above the current window.
category:
buffers-windows
tags:
#buffers-windows
#editing
How do I paste the last yanked text while in Insert mode without using the unnamed register?
In Insert mode, {reg} pastes the contents of any register inline at the cursor.
category:
registers
tags:
#registers
#insert-mode
#editing
How do I understand which register Vim uses for each operation?
Vim has 10 types of registers, each serving a specific purpose.
category:
registers
tags:
#registers
#reference
#clipboard
#workflow
How do I view the contents of all registers in Vim?
The :registers command displays the contents of all Vim registers, showing you exactly what text is stored in each one.
category:
registers
tags:
#registers
#ex-commands
#normal-mode
How do I delete text without overwriting my yank register?
The "d command deletes text using the black hole register ("), which discards the deleted content instead of storing it.
category:
registers
tags:
#registers
#editing
#delete
#normal-mode