Questions tagged [cut-copy-paste]

Questions about cutting, copying, and pasting text. In Vim, "cut" is also called "delete", "copy" is also called "yank", and "paste" is also called "put".

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
18 views

How to copy text to X primary selection only when visual mode is started with the mouse?

At the moment, if I use Visual mode, whenever I select a block of text using the keyboard it ends up on my X primary selection (ie the clipboard that is filled using the mouse). Even if I just select ...
3
votes
0answers
101 views

Cursor position after pasting

I believe the default behaviour in vi(m) for pasting (p) or (P) was to leave the cursor at the current position as before pasting, and in order to paste a register and have the cursor be at the end of ...
3
votes
0answers
121 views

how to delete a paragraph respecting the folds?

I have a file (filetype=javascript), this is how it looks without folds: and with folds: I can move with the { and } motions skipping the empty lines inside the folds (thanks to these question and ...
2
votes
0answers
32 views

Copy all text in Vi and then paste it to another application on another system

I connect to Linux server via SSH using Putty terminal. I open a file with Vim and press ggVGy in order to select all text and copy it. But when I try to paste the copied text to Windows Notepad, it ...
1
vote
0answers
41 views

Can't Copy Non-ASCII Characters

I can't copy Non-ASCII charaters from Neovim anymore when I select them with mouse or crtl + v. For example, I have the Turkish word Bankası written in my editor. When I yank and paste it to somewhere ...
1
vote
0answers
47 views

Vim adding blank line after each line when pasting from clipboard

When I copy-paste multiple lines from clipboard into my vim, it inserts a blank line after every line. But when I copy in into a text editor first and then copy-paste it into vim, the blank lines are ...
1
vote
0answers
29 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
16 views

Problem pasting text with brackets when using auto-close functions/plugins

It's nice to have an auto-close plugin for brackets and quotes like coc-pairs. However, when I paste text from outside into vim insert (ctrl-C, ctrl-shift-v), the text seems to be pasted character-by-...
1
vote
0answers
34 views

Preview previously yanked text before put

I know that previous yanks are kept in numbered yank registers, a preview available with :registers. However this requires to keep a mental model which yank went where, with these numbers ever ...
1
vote
0answers
38 views

Update OS enviroment variables from inside VIM

I use vim inside tmux over an ssh session and I often run into the issue where the $DISPLAY variable gets changed, screwing up my copy-paste. When I log in, $DISPLAY gets assigned to something new: ...
1
vote
0answers
27 views

Yanking a visual block with word wrap enabled is shifted

Say I have a file with the following contents (on a single line): Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed augue ligula, venenatis et orci non, convallis congue nunc. Nam eleifend ...
1
vote
0answers
431 views

linux: yank to clipboard, cut to primary

I'm using neovim. I want to map the 0 register to the system clipboard and the unnamed register to the system primary (mouse middle click). Is it possible? I can map the unnamed register to primary ...
0
votes
1answer
48 views

How can I put the system clipboard into a vim register?

Basically the opposite of this question. This is on macOS. I copy from a program using ⌘C and I want to add that text to "" or "0 so when I cw or something similar I don't obliterate my copied text. ...
0
votes
0answers
21 views

Automating a yank and paste operation

If I want to copy and paste the next 5 lines and paste those 5 lines below the next 5 lines, I would do 5yy5jp. How would I use command to say something like 5yyp to paste the next 5 lines and ...
0
votes
0answers
69 views

Move/copy range to start of current line

I just learned about the shortcuts that allow you to manipulate ranges, e.g. :+5,+10co. to copy after the current line. I wondered if there is a way to copy and move at the start of the current line? ...
0
votes
0answers
34 views

Quick paste via single keybind

As I understand, the default cursor looks like this: ▉ block. Currently I have these related settings: set guicursor=c-n-i-v:ver25-blinkoff0 And ver25 makes the cursor look and behave as if only ...
0
votes
0answers
127 views

Blockwise pasting from "+ register not working

UPDATE: I run an X server (XQuartz 2.7.11) on MacOS, which I forward via ssh to any Linux machine I use. The problem seems to be that under XQuartz, the "+ register does not support blockwise yanking/...
0
votes
1answer
149 views

IPython %cpaste command freezes in Terminal mode

I try to use IPython's %cpaste to paste the clipboard content (Python code) to my Terminal which is launched via Neovim's terminal mode. However, if I paste long lines of code, it freezes, and does ...
0
votes
0answers
414 views

Disable paste mode entirely

I get what paste mode does for you, but I have never found it particularly useful. I would like to completely deactivate it. I don't see an option to do so when looking at :help paste. However, I ...