copy in vim paste in lagrange - work

copy in lagrange paste in vim - not work

freakin sdl reeeeeeeee

๐Ÿ namark

Feb 04 ยท 3 months ago

4 Comments โ†“

๐Ÿš€ SavaRocks ยท Feb 04 at 16:50:

To copy text from Vim to the system clipboard, use Visual mode (v or V) to select text, then press "+y to yank it to the + register. Alternatively, add set clipboard=unnamedplus to your .vimrc file to make all yanks go to the system clipboard automatically.

๐Ÿ namark [OP] ยท Feb 04 at 20:45:

To paste text to Vim from the system clipboard, use Normal mode (frantically press ESC) to not select text, then press "+p to paste it from the + register. Alternatively, add set clipboard=unnamedplus to your .vimrc file to make all pastes come from the system clipboard automatically.

๐Ÿฆ wasolili [...] ยท Feb 04 at 23:11:

use Normal mode (frantically press ESC)

you can paste without leaving insert mode by using CTRL-R <register_you_want_to_paste_from>, e.g. CTRL-R + will paste from the system clipboard (if your copy of vim was compiled with support for the system clipboard)

you can also use your terminal emulators shortcut key for pasting from the system clipboard which varies from terminal emulator to terminal emulator, but is usually CTRL-SHIFT-V.

i don't personally like the clipboard=unnamedplus option because most of my vim yanking is specific to the editing I'm doing and doesn't need to pollute my system clipboard, and most of the stuff i copy outside of vim is not relevant to my vim editing and doesn't need to pollute my vim registers.

use Visual mode (v or V) to select text

you can also use motion commands to yank without using visual mode

๐Ÿ namark [OP] ยท Feb 05 at 16:34:

use Normal mode (frantically press ESC)

you can paste with leaving insert mode by not using CTRL-R <register_you_want_to_paste_from>, not e.g. CTRL-R + will paste from the system clipboard (even if your copy of vim was not compiled with support for the system clipboard)

you can also not use your terminal emulators shortcut key for pasting from the system clipboard which varies from terminal emulator to terminal emulator, but is usually CTRL-SHIFT-V.

i do personally like the clipboard=unnamedplus option because least of my vim yanking is not specific to the editing I'm not doing and does need to pollute my system clipboard, and least of the stuff i don't copy outside of vim is relevant to my vim editing and does need to pollute my vim registers.

use Visual mode (v or V) to select text

you can also not use motion commands to yank with using visual mode