⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 l5.2

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 2
字号:
#print			Yanking and Putting   Often you will want to move text from one place in the file to another.You do this in vi by first deleting it, all in one chunk (e.g. to delete 5 linestype '5dd', not 'dddddddddd'), moving to the new location, and typing 'p'.This stands for 'put' and it simply inserts the most-recently deleted text.The 'p' command will insert it after the current line or character (dependingupon the type of delete done) and 'P' inserts it before said line/character.   If you just want to copy the text, what you'd like is some way to 'delete'the text without really deleting it.  For this, vi provides the 'yank'command, which does just that.  To copy five lines to somewhere else, say'5yy' (this memorizes the next five lines), then move the cursor to thenew location and hit 'p'.  The 'y' command can use any targets that 'd' canuse.  (In general, targetable commands can always be doubled, as in 'yy',to make them refer to the current line.)   Type 'ready' now to try out yanking and putting.#user#create YankPut   'p' puts the most-recently deleted text after the current position and   'P' puts it before the current position.   'y' works just like the 'd' command except that it doesn't actually	delete the text, it only memorizes it.   Note that putting doesn't make vi forget what it last yanked or deleted.That is, you can yank something once and then put it several times, to makeseveral copies of it.---------------------------------------------------------------------------#cat /usr/lib/learn/vi/longtext >> YankPutvi YankPut#next5.3  10

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -