Questions tagged [paste]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
21 views

Paste register contents from :reg screen

:reg displays the contents of the numbered and special registers. Is there a way to then paste a register but retain the output of :reg on the screen? This avoids the need to store the register name ...
user avatar
  • 103
0 votes
0 answers
14 views

Storing Latex Chunks in Registers

Previously I asked about how one could yank both sides of an equality into registers. My use case was writing latex and wanting to be able to take work that I previously just wrote and modify it ...
user avatar
2 votes
0 answers
40 views

How to paste line but preserve the cursor position?

I want to achieve following. Imagine I have a line of code, say: std::cout << "STEP #0" << "\r\n"; Now I want to paste it somewhere else, but I want to stay cursor in ...
user avatar
  • 161
1 vote
2 answers
130 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 ...
user avatar
  • 21
0 votes
0 answers
159 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 ...
user avatar
  • 227
1 vote
1 answer
144 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 ...
user avatar
  • 199
3 votes
1 answer
45 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| ...
user avatar
0 votes
1 answer
24 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 ...
user avatar
  • 1,670
0 votes
1 answer
187 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. ...
user avatar
3 votes
0 answers
600 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 ...
user avatar
  • 133
1 vote
1 answer
160 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. ...
user avatar
1 vote
1 answer
319 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 ...
user avatar
  • 2,238
2 votes
1 answer
143 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?
user avatar
  • 860
1 vote
0 answers
37 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 ...
user avatar
0 votes
1 answer
44 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?
user avatar
  • 305
1 vote
2 answers
178 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 ...
user avatar
  • 1,704
8 votes
2 answers
1k 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 ...
user avatar
2 votes
1 answer
119 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 ...
user avatar
  • 26.3k
1 vote
1 answer
506 views

How to paste yanked text over visual selection?

Yanked text with y, then v select some text, paste with p, but nothing happens.
user avatar
  • 922
2 votes
0 answers
32 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 ...
user avatar
2 votes
1 answer
122 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 ...
user avatar
  • 155
0 votes
1 answer
68 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 ...
user avatar
  • 103
0 votes
1 answer
197 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 ...
user avatar
  • 354
1 vote
1 answer
539 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=...
user avatar
3 votes
1 answer
5k 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 ...
user avatar
  • 211