2012-03-19 82 views
0

我试图将文本粘贴到heroku vi编辑器中,就像facebook教程中的代码片段一样,但我似乎无法弄清楚。 我试过vi编辑器将某些页面的文本粘贴到vi编辑器页面

:"*P 
:"*p 
:p 

等等,我使用Windows 7的所有重要?任何想法

+0

我认为这就是你要找的 http://vim.wikia.com/wiki/Using_the_Windows_clipboard_in_Cygwin_Vim – 2012-03-20 10:42:51

回答

0

一开始,您必须将文本复制到缓冲区,然后按yy在要复制的行上,然后您可以使用p将其粘贴到任何位置。

希望它能帮助:)

+0

我正在从网页复制文字?! – Shpat 2012-03-19 16:31:35

1

打开vi编辑器,你要开始一个空的,不知名的文件

type ':set noai nosm' (without the single-quotes) (you need the ':' char) 
press the enter key 
press the letter i (for insert) 
now use the appropriate mouse click to paste your text 
type ':wq myFileName.php' (no single-quotes) 
# this 'w'rites the filename and 'q'uits the editor 

现在你应该有你想要的代码的文件。

顺便提一句,这并不是真正的编程问题,今后请使用相关站点superuser.com发布这类问题。

我希望这会有所帮助。

0

只需从网页中选择并正常复制..并右键单击想要粘贴在Unix终端上的光标位置(即vi编辑器)。

它会被粘贴。

+0

好吧,我不能粘贴任何东西在heroku vi编辑器,除了我从那里复制。 – Shpat 2012-03-19 17:05:21