vi-editor
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
vi-editor [2018/08/30 22:24] – external edit 127.0.0.1 | vi-editor [2019/02/23 16:24] – re-done tables wiki_admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Using the vi editor ====== | ====== Using the vi editor ====== | ||
- | For any linux/unix- newbies like me, a quick tutorial on the vi editor might be needed. Here are some short instructions on using it, taken from the "Using Amiga UNIX" manual, page 99-119. | + | //For any linux/unix- newbies like me, a quick tutorial on the vi editor might be needed. Here are some short instructions on using it, taken from the "Using Amiga UNIX" manual, page 99-119.// |
Using the vi editor | Using the vi editor | ||
Line 19: | Line 19: | ||
The vi editor doesn' | The vi editor doesn' | ||
- | Special keys | + | <table label> |
- | ESC cancel insert mode | + | < |
- | CTRL-L redraw screen | + | | ESC | cancel insert mode | |
- | CTRL-D scroll down | + | | CTRL-L| redraw screen| |
- | CTRL-U scroll up | + | |CTRL-D|scroll down| |
+ | |CTRL-U|scroll up| | ||
+ | </ | ||
- | Quit and save | + | <table label> |
- | :q! quit without saving | + | < |
- | :wq save and quit a file | + | |:q!|quit without saving| |
- | :w save your work | + | |:wq|save and quit a file| |
- | :r file read another file into your current file | + | |:w|save your work| |
+ | |:r|file read another file into your current file| | ||
+ | </ | ||
- | Move in a file | + | <table label> |
- | w to next word | + | < |
- | 0 back to beginning of line | + | |w|to next word| |
- | $ to end of line | + | |0|back to beginning of line| |
- | G to the lasLline | + | |$|to end of line| |
- | :n move to line numher | + | |G|to the lastline| |
+ | |:n|move to line number | ||
+ | </ | ||
- | Insert and append | + | <table label> |
- | i insert text | + | < |
- | a add text | + | |i|insert text| |
- | o add blank line | + | |a|add text| |
+ | |o|add blank line| | ||
+ | </ | ||
- | Delete text | + | <table label> |
- | X delete character | + | < |
- | dw delete word | + | |X|delete character| |
- | dd delete | + | |dw|delete word| |
- | ndd delete n lines | + | |dd|delete |
+ | |ndd|delete n lines| | ||
+ | </ | ||
- | Undo and repeat | + | <table label> |
- | u undo last change | + | < |
- | U undo changes to line | + | |u|undo last change| |
- | . (dot) repeat last change | + | |U|undo changes to line| |
+ | |.(dot)|repeat last change| | ||
+ | </ | ||
- | Move and copy | + | <table label> |
- | dd cut | + | < |
- | yy yank (copy) | + | |dd|cut| |
- | p paste below | + | |yy|yank (copy)| |
+ | |p|paste below| | ||
+ | </ | ||
- | Change text | + | <table label> |
- | cw change word | + | < |
- | cc erase a line and insert | + | |cw|change word| |
- | c change to end of line | + | |cc|erase a line and insert| |
+ | |c|change to end of line| | ||
+ | </ | ||
- | Search | + | <table label> |
- | / search | + | < |
- | n repeat search | + | |/|search| |
- | N reverse search | + | |n|repeat search| |
+ | |N|reverse search| | ||
+ | </ |
vi-editor.txt · Last modified: 2021/09/19 18:00 by 127.0.0.1