diff --git a/cheat_sheet.md b/cheat_sheet.md index 1f77973..8a53a08 100644 --- a/cheat_sheet.md +++ b/cheat_sheet.md @@ -34,13 +34,26 @@ ## Navigation +### 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 + +### 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 @@ -52,8 +65,19 @@ - `dvb` delete backward to beginning of word including current char - `x` delete current char - `X` delete previous char + + +## 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 +- `:noh` stop search highlight - `:%s/wordtochange/changedvalue/gc` search/replace + ## Copying - `"+y` copys visual selection to clipboard