Skip to content

Instantly share code, notes, and snippets.

@Archisman-Mridha
Archisman-Mridha / neovim.cheatsheet.md
Last active May 10, 2026 05:23
Neovim cheatsheet

Anatomy of a motion - Command + Count + Motion

Navigation

  • Jump to beginning of line : 0 | jumps to the first non-whitespace character : _
  • Jump to end of line : $
  • Move forward by 1 word : jumps to beginning of the next word : w | jumps to end of the next word : e
  • Move backward by 1 word : jumps to beginning of the previous word : b | jumps to end of the previous word : ge
  • Jump to beginning of the file : gg
  • Jump to end of the file : G
  • Move forward to the next instance of the character (( in this case) : f( // NOTE : Repeat motion using , (for backwards movement) or ; (for forward movement)
@Strus
Strus / clangd.md
Last active May 16, 2026 03:19
How to use clangd C/C++ LSP in any project

How to use clangd C/C++ LSP in any project

tl;dr: If you want to just know the method, skip to How to section

Clangd is a state-of-the-art C/C++ LSP that can be used in every popular text editors like Neovim, Emacs or VS Code. Even CLion uses clangd under the hood. Unfortunately, clangd requires compile_commands.json to work, and the easiest way to painlessly generate it is to use CMake.

For simple projects you can try to use Bear - it will capture compile commands and generate compile_commands.json. Although I could never make it work in big projects with custom or complicated build systems.

But what if I tell you you can quickly hack your way around that, and generate compile_commands.json for any project, no matter how compilcated? I have used that way at work for years, originaly because I used CLion which supported only CMake projects - but now I use that method succesfully with clangd and Neovim.

@d7samurai
d7samurai / .readme.md
Last active May 2, 2026 08:25
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++ / OOP or (other) obscuring cruft. View on YouTube

hollowcube

Other gists in this series: