From 8c71b1eeb58c724b41f195c0fd0ec54a27e99411 Mon Sep 17 00:00:00 2001 From: mahuntington Date: Fri, 24 Nov 2023 13:06:44 -0500 Subject: [PATCH 1/3] Update 'cheat_sheet.md' --- cheat_sheet.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cheat_sheet.md b/cheat_sheet.md index 1f77973..280959e 100644 --- a/cheat_sheet.md +++ b/cheat_sheet.md @@ -52,8 +52,17 @@ - `dvb` delete backward to beginning of word including current char - `x` delete current char - `X` delete previous char + + +## Search + +- `/` find +- `n` find next match +- `N` find previous match +- `:noh` stop search highlight - `:%s/wordtochange/changedvalue/gc` search/replace + ## Copying - `"+y` copys visual selection to clipboard From 59dc6bb94c515ce09e17db1ae22836622758603b Mon Sep 17 00:00:00 2001 From: mahuntington Date: Mon, 8 Jan 2024 17:59:04 -0500 Subject: [PATCH 2/3] Update 'cheat_sheet.md' --- cheat_sheet.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/cheat_sheet.md b/cheat_sheet.md index 280959e..25e07bc 100644 --- a/cheat_sheet.md +++ b/cheat_sheet.md @@ -34,13 +34,23 @@ ## Navigation +### Cursor + +- `H` move to top of screen +- `M` move to middle of screen +- `L` move to bottom of screen + +### Screen + - `` page down - `` page up - `` half page down - `` half page up -- `H` move to top of screen -- `M` move to middle of screen -- `L` move to bottom of screen +- `` to move the screen up one line. +- `` to move the screen down one line. +- `zz` to move the current line I'm on to the center of the screen. +- `zt` to move the current line I'm on to the top of the screen. +- `zb` to move the current line I'm on to the bottom of the screen. ## Editing From d02b6d14aa0391bce4a5a5f24ba559153da6faf7 Mon Sep 17 00:00:00 2001 From: Matthew Huntington Date: Sat, 31 Aug 2024 22:43:17 -0400 Subject: [PATCH 3/3] :vim --- cheat_sheet.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cheat_sheet.md b/cheat_sheet.md index 25e07bc..8a53a08 100644 --- a/cheat_sheet.md +++ b/cheat_sheet.md @@ -36,6 +36,9 @@ ### Cursor +- `hjkl` - move +- `w` - move to next word +- `b` - mve to previous word - `H` move to top of screen - `M` move to middle of screen - `L` move to bottom of screen @@ -66,6 +69,8 @@ ## Search +- `:vim a *.*` - search for 'a' in all files in dir +- `:copen` / `cclose` open quickfix list to view matches of `:vim` - `/` find - `n` find next match - `N` find previous match