Skip to content

Instantly share code, notes, and snippets.

@imkarimkarim
Last active June 6, 2024 10:11
Show Gist options
  • Save imkarimkarim/ae6f08c6e0fd8245a83f636950d6e5e0 to your computer and use it in GitHub Desktop.
Save imkarimkarim/ae6f08c6e0fd8245a83f636950d6e5e0 to your computer and use it in GitHub Desktop.
chad-cheats (nvchad cheatsheet)
chad-cheats:
# based on: https://youtu.be/Mtgo-nP_r8Y
space + h + t : change theme
:TSInstall <language>(elixir) : add syntax highlighting support
:TSInstallInfo : see what syntax highlighting are already installed
ctrl + n : file tree
- m : mark
- a : add file
- c : copy file
- p : paste file
- r : rename file
space + f + f : find in all files
space + f + b : find in open files(buffers)
space c h : show/hide cheatsheet
space (wait for a second) : command suggestions will appear
ctrl + h/j/k/l : navigation
:vsp : vertical split
:sp : horizontal split
space + n : toggle line numbers
tab / shift + tab : cycle through open files(buffers)
space + x : close file(buffer)
space + / : toggle comment
space + h/v : terminal
ctrl + ] : go to definition
ctrl + g : get the full path of the current file
---
0 - go to begining of the line
g_ - go to the end of the line
w - go word by word forwared
b - go word by work backward
e - go the the end of the work forward
gg - move cursor to first line
#G - move cursor to # line
GG move cursor to last line
CTRL+f - move cursor Forward full page
CTRL+b - move cursor Backwards full page
CTRL+u - move cursor Up half page
CTRL+d - move cursor Down half page
zt - move screen so cursor is at Top
zb - move screen so cursor is at Bottom
zz - center screen on cursor (very useful!)
H - move cursor to top ("high up" or "home") of window
M - move to middle of window
L - move to bottom ("low" or "last line") of window
---
customization: https://youtu.be/Mtgo-nP_r8Y?t=402
LSP(language servers): https://youtu.be/Mtgo-nP_r8Y?t=583
fix copy to clipboard issue: https://askubuntu.com/questions/1486871/how-can-i-copy-and-paste-outside-of-neovim
format on save: https://www.jvt.me/posts/2022/03/01/neovim-format-on-save/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment