# vim cheat sheet ## Page Up/Down | Mode | Key | Command | | ---- | ------ | ---------------------- | | n | ctrl+d | Scroll down half page | | n | ctrl+u | Scroll up half page | | n | ctrl+f | Scroll down whole page | | n | ctrl+b | Scroll up whole page | | n | ctrl+e | Scroll down 1 line | | n | ctrl+y | scroll down 1 line | ## Search | Mode | Key | Command | | ---- | --- | ---------------- | | n | / | Search forward | | n | ? | Search backwards | ## Buffers | Mode | Key | Command | | ------- | ---- | -------------- | | command | bd # | Close buffer # | ## Windows | Mode | Key | Command | | ------ | -------- | ------------------------------- | | normal | ctrl+w = | Make window taller | | normal | ctrl+w > | Make window wider | | normal | ctrl+w < | Make window narrower | | normal | ctrl+w x | Swap windows with eachother | | normal | ctrl+w L | Make horizontal split vertical | | normal | ctrl+w K | Make vertical split horizontal | ## Window aliases | Mode | Key | Command | | ------ | --------- | -------------------------- | | normal | space w t | Make window a lot taller | | normal | space w s | Make window a lot shorter | | normal | space w w | Make window a lot wider | | normal | space w n | Make window a lot narrower | ## Tabs | mode | key | command | | ------- | -------- | ------------------------------- | | command | :tabnew | Open new tab | | normal | gt | Next tab | | normal | gT | Previous tab | | normal | ctrl+w T | Opens current window in new tab | ## netrw | Mode | Key | Alias | Command | | ------- | -------- | --------- | ------------------------------ | | command | :Explore | | Open in current window | | command | :Lexpore | space c c | Open in new window to the left | | netrw | enter | | Open in previous window | | netrw | v | | Open in new vertical window | | netrw | o | | Open in new horizontal window | ## links | mode | key | command | | ------ | --- | ------------------- | | normal | gx | Open url in browser | ## Reload | mode | key | command | | ------- | -------- | --------------- | | command | :restart | Restarts neovim |