Questions tagged [paste]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
2answers
529 views

Paste append multiple lines

I search a way to paste/merge 2 block of text apple pear banana tomato beans potato like this apple tomato pear beans banana potato The lines have different length but same number of lines of ...
3
votes
1answer
38 views

Need a functionality behaving like Replace on text but for Pasting Blocks

One of my vim usages is to do sketches of topologies in networking I've found the script Draw it really really useful for that So I can draw things like this by pasting these boxes +------+ |ROUTER| ...
3
votes
1answer
3k views

Paste not working

File: 1111 2222 3333 4444 If I yyP on 2222, the system clipboard is pasted in, not 2222 as expected. However, :reg shows that 2222 was saved to register 0 and ". I expected it to save to th If I ...
3
votes
0answers
229 views

“^[[201~” character being pasted at the end of file

I'm trying to copy-paste by hand this file, but whenever I paste the contents in vim the last line shows this weird character at the end of the line ^[[201~. My guess is that it's one of those wrong ...
2
votes
1answer
61 views

Pasting modified register contents into Visual Block selection

Consider this mapping: vnoremap <leader>U ygv"=toupper(@@)<cr>p It will yank the current visual selection, select it back, and then put a modified version of it. In this case, uppercase ...
2
votes
0answers
30 views

Allow pasting into all modes, not just insert [duplicate]

I use command-line vim in xterms (actually TERM=rxvt-unicode) and have long been used to allowing X to manage all mouse interactions, with vim remaining blissfully unaware of the difference between ...
1
vote
1answer
124 views

Is it possible for Vim to confirm before pasting huge amount of text?

I am wondering if there is a way for Vim to alarm me when I am pasting a large amount of texts (using clipboard) into it. For example, when I am pasting more than 10000 letters, Vim can alarm me that ...
1
vote
2answers
93 views

Why does <F22> appear when pasting into Vim?

I want to paste some text into Vim in GNOME Terminal on Ubuntu 20.04. Before doing that, I run: :set paste I use that so that autoindent and other Vim features don't change the text that I am ...
1
vote
1answer
85 views

vim - how do I cut some lines of file-1 to file-2 in 1 step?

When I need to cut some lines from one file to another file, I always do the following steps: Select the lines in file-1 :w >> file-2 Re-select the lines d This is super annoying if you need ...
1
vote
1answer
40 views

How to paste copied character in ex mode?

Pressing yl I can copy the character where cursor locates. Now I press : to enter into last line mode, I enter %s/. Now I want to paste the character copied by yl. How can I do that?
1
vote
1answer
55 views

Can't type <>[]{}'"()` and backspace in vim after :set nopaste

This is a re-post from my deleted post at Stack Overflow. OS: MacOS catalina Vim version: VIM - Vi IMproved 8.1 Problem: Can't type <>[]{}'"() and backspace in vim after :set nopaste. ...
1
vote
1answer
135 views

Disable Shift+Insert from pasting from Primary

In Vim, the canonical methods to interact with X11's Clipboard and Primary is to use + and * registers. There are at least another two ways to paste from Primary into Vim: Shift-Insert and Mouse ...
1
vote
1answer
255 views

How to paste yanked text over visual selection?

Yanked text with y, then v select some text, paste with p, but nothing happens.
1
vote
0answers
33 views

losing random chars when pasting (insert mode + :set paste are set)

When pasting a huge text (10,000 lines, around 500KB) in vim (yes, I'm using insert mode and :set paste), I lose random characters every few lines. I thought it could be a plugin, so I tried starting ...
1
vote
1answer
253 views

tabs after pastetoggle instead of spaces

Using following .vimrc " Just to see tab/spaces/endline clearly: set encoding=utf-8 set list set listchars=tab:▸\ ,eol:¬ nnoremap <F5> :set list!<cr> " Tab to spaces settings set tabstop=...
0
votes
1answer
39 views

Yank once then multiple paste [duplicate]

My cursor is on line 10. How can I yank line 5 and paste to lines 10,20,30,40, and 50? I know :5 yank then navigate to each line and then P, how else can I do this?
0
votes
1answer
35 views

How to paste rich-text in GVim

If I copy a selection from a webpage in Firefox or Chrome, I can paste into eg Thunderbird and retain formatting, links etc. Is it possible to copy a selection of text with links etc in browser and ...
0
votes
1answer
84 views

Inline paste from System Clipboard

I have recently started using Neovim on Windows 10. I use "+p to paste from the system clipboard. But sometimes I just want to paste inline before or after the cursor without adding a new line. ...
0
votes
1answer
64 views

Can I select and paste with a single operation?

Here's my use case. I have the following text: This is a [hyperlink](http://someurl.com). Now I want to replace the http://someurl.com text with a new URL in the default register (something I've ...
0
votes
1answer
125 views

Multiline paste with relative columns alignment

When I have some text indented as follows (like a and b variables assignment): if(condition) a = 1; b = 2; end and I want to paste a and b block somewhere outside of the if block, i.e just ...
0
votes
0answers
48 views

Why does PASTE mode mess up my text sometimes?

If I go to this web page on my MacOS, hit Command+A to highlight all the text, Command+C to copy it, open vim, enter insert mode, and paste with Command+V, it looks like: If I do exactly the same ...
0
votes
1answer
20 views

Understanding interaction between visual, autoindent, and paste option

Let's start form this faulty C++ source file #include <vector> int main() { std::vector<std::vector<int>> v{ 1,2}, 9,3}, 4,2} }; } which ...