From 4f51385ea7824ebd355c13ccd5dbee3c62f94660 Mon Sep 17 00:00:00 2001 From: kenmartin-unix <58759557+kenmartin-unix@users.noreply.github.com> Date: Tue, 26 Dec 2023 09:51:56 -0500 Subject: [PATCH] Add files via upload Notes on vi under Unix --- vi.notes | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 vi.notes diff --git a/vi.notes b/vi.notes new file mode 100644 index 0000000..782c534 --- /dev/null +++ b/vi.notes @@ -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 +