Browse Source

Add files via upload

Notes on vi under Unix
master
kenmartin-unix 8 months ago
committed by GitHub
parent
commit
4f51385ea7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 21 additions and 0 deletions
  1. +21
    -0
      vi.notes

+ 21
- 0
vi.notes View File

@@ -0,0 +1,21 @@
12-17-2023 KenUnix Old School

In vi under Unix use the following most common keys:

a = Ad text
dd = Delete current line. Example to delete 3 lines you would enter 3dd
i = Insert text at cursor position
j = Join lines at the cursor
p = paste yanked lines at current line position
q = Quit vi
q! = Quit vi without saving
r = Read file , append
s = Substitute text. Example :s/old/new/ for current line
or :s 1,$ /old/new/ for entire file
u = Undo the lest operation
w = Write file
x = Erase character under cursor
yy = Yank line
: = Issue command. Example :w to write file
esc= Go to command mode


Loading…
Cancel
Save