DispersedNet
SiteMap
Unix Concepts
Shell Programming
Shell Scripting
Unix Questions
vi editing
«Prev
Unix Concepts
File Management
List Files Command
Copy Directories Command
Removing Directories Quickly
Unix About Links
Creating File Link
Find Command Search
File Management Conclusion
Unix Customization
Creating Aliases Unix
list current Aliases
Displaying Previous Commands
Repeating Previous Commands
Modifying Previous Command
Changing System Prompt
Storing shell Settings
Customize-environment
Grep Regular Expression
Define Regex
Using Quotes with Regex
Matching Pattern Occurrences
Matching Pattern Position
Turnoff Character Meaning
Regex Conclusion
Pattern Matching - Quiz
editing with vi
vi Review
Text in vi
Creating Text
Creating Command Shortcuts
Configure Editing Environment
Storing Custom Settings
Esditing Multiple Files
Pasting Text Files
vi Editing Conclusion
Managing Disk Space
Using named buffers to paste between files
1) Assuming that you entered the command, vi recipe quartet, you can start editing the recipe file as shown
2) Delete the first line, Grilled Salmon, and store it in a buffer name a.
To do that, type add as the command sequence. The result appears in this image
3) You plan to paste the buffer contents into the next file, so you use the :n command to go there.
4) Instead of going to the next file, vi displays the message "No write since last change." That is because you did not save before leaving the current file. A common mistake when editing multiple files.
5) Enter :w to save the recipe file.
6) This time, the :n command takes you to the quartet file as you expect.
7) To put the contents of buffer above the line, type a P as the command sequence. Now the Grilled Salmon appears at the top line.
p: put (paste) the line(s) in the buffer into the text after the current line
8) When you are ready to leave vi, enter :wq to write and quit.