1

I want to use vi for better pasting.

When I use vi I get vim
When I type /usr/bin/vi I still get vim

This is on my Max OSX 10.10 Yosemite

3
  • 1
    when you exec vim via vi softlink vim behave as original vi. Is this you search for? Feb 12, 2015 at 19:54
  • 1
    "Better pasting" from Vi? How does that work?
    – jasonwryan
    Feb 12, 2015 at 20:22
  • 2
    I think you're asking the wrong question. What pasting are you trying to accomplish? Are you aware that the * register corresponds to the system clipboard, so you can type "*y to yank your selection to the system clipboard and "*p to paste from the system clipboard? Feb 12, 2015 at 21:27

2 Answers 2

1

From your description I suspect you're looking for enabling Paste mode in Vim. You may do this as follows:

:set paste

It can be disabled with

:set nopaste

This mode is useful when you copy-paste some code snippet from your OS buffer to Vim. This will prevent Vim from adding lots of extra spaces to line beginnings making pasted text look ugly.

0

Most systems at this point use a symlink of vi to the vim program. Calling the program in this manner enables some functionality and disables other modes of operation. More to the point, you note that you're wanting to utilize the paste functions in vi. I'm going to make the assumption that you're using vi on Mac OSX in the terminal program. To utilize the copy and paste functions you should highlight the text with your mouse and use the following keyboard combinations:

Command+X  - To 'cut' text from it's current position (which you can then paste somewhere else).
Command+C  - To 'Copy' any text highlighted with your mouse.
Command+V  - To 'Paste' the copied or cut text at the current cursor position.

Other options also exist, however, I think these three should give you a good start in what you are trying to accomplish. If you want to learn more, look at the vi or vim documentation using the command 'man vi'.

Not the answer you're looking for? Browse other questions tagged .