New answers tagged cut-copy-paste
1
vote
How to clear the uppercase registers?
My understanding is that the lowercase register and the lowercase one are actually the same.
When you yank using the lowercase version you replace the content of the register.
When you yank using the ...
- 6,075
3
votes
Accepted
How can I copy the whole number under the cursor?
/\d\+
searches for one or more digits, as many as possible.
N
repeats the search in the opposite direction because / moved the cursor to the next match.
ygn
yanks the current match of the previous ...
- 36k
2
votes
How can I copy the whole number under the cursor?
If you consider installing plug-ins for this purpose, look into:
https://github.com/MisanthropicBit/vim-numbers
Or:
https://github.com/tkhren/vim-textobj-numeral
Both of them add a in text object ...
- 27.3k
0
votes
Accepted
`Cmd+V`/`Ctrl+V` pasting has an extra new line
If you use the line mode selection (V) the yank (y) operation will yank the carriage return at the end of the line.
If you don't want the carriage return at end of the last line you have to use the ...
- 6,075
2
votes
Copy a word and paste the same word at multiple places in Vim
As of current vim (since 2022-05-06) you can use P in visual mode to paste over a selection without overriding unnamed register (:h v_P):
With |p| the previously selected text is put in the unnamed ...
- 12k
Top 50 recent answers are included
Related Tags
cut-copy-paste × 465register × 48
os-clipboard × 37
visual-mode × 30
key-bindings × 29
vimrc × 23
neovim × 20
cursor-motions × 19
visual-block × 19
vimscript × 17
normal-mode × 15
replace × 13
gvim × 11
terminal × 11
indentation × 11
cursor-movement × 11
command-line × 10
insert-mode × 10
search × 9
macos × 9
linux × 7
repeated-commands × 7
substitute × 6
tmux × 6
mouse × 6