Friday, April 19, 2024
 Popular · Latest · Hot · Upcoming
273
rated 0 times [  273] [ 0]  / answers: 1 / hits: 970302  / 1 Year ago, sun, february 12, 2023, 9:12:34

I tried using Ctrl + V for pasting contents in a vi editor document, but Ctrl + V is not interpreted as a paste.


More From » editor

 Answers
3

First, make sure you're in edit mode (press i). Then you can paste with Ctrl+Shift+V, if you're in a terminal emulator like gnome-terminal (or select "Paste" from the right-click menu).



You can also type :set paste in vim before you paste to disable automated indenting, etc. Then :set nopaste after you've pasted the content.



Also check this question on stackoverflow.com for more information.



If you want to copy/paste lines in vim (as opposed to pasting clipboard content), you'll want to check out the yank command. Here is a cheat sheet that might help.


[#32665] Monday, February 13, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ainbby

Total Points: 184
Total Questions: 115
Total Answers: 112

Location: Colombia
Member since Thu, Sep 29, 2022
2 Years ago
ainbby questions
Thu, Mar 23, 23, 10:26, 1 Year ago
Wed, May 10, 23, 00:10, 1 Year ago
Fri, Apr 15, 22, 10:11, 2 Years ago
;