===== Introduction ===== This is Vim Syntax highlighting setting for [[https://github.com/raysan5/raylib|Raylib]]. in C++ Developement. ===== Setting File ===== ==== 1. Make File ==== Your Custom Syntax File is Located at [~/.vim/after/syntax] and, We will make C++ Synatx file. So we will make cpp.vim at [~/.vim/after/syntax] For Linux, This command will make cpp.vim mkdir -p ~/.vim/after/syntax cd ~/.vim/after/syntax touch ~/.vim/after/syntax/cpp.vim Well, 'touch' command is unnessary. (or optional). Cause if we command 'vim cpp.vim', then cpp.vim file is created. Now, we will Edit "cpp.vim" file. ==== 2. Edit File ==== For Visual Studio Code, code cpp.vim # code ~/.vim/after/syntax/cpp.vim and for VIM vim cpp.vim # vim ~/.vim/after/syntax/cpp.vim ===== Create Custom cpp.vim ===== ==== 1. cpp.vim ==== This is my custom cpp.vim File For Raylib. " Vim syntax file " Language: C++ " Specific Library : Raylib (https://github.com/raysan5/raylib) " Author : Dongkun Lee (https://lawwiki.kr/doku.php/start) " First Created at : 2025. 12. 25. (Christmas!!) " ver 1.0 syn keyword raylibWindow InitWindow CloseWindow SetWindowState ClearWindowState ToggleFullscreen ToggleBorderlessWindowed syn keyword raylibWindow GetScreenWidth GetScreenHeight GetRenderWidth GetRenderHeight GetMonitorCount GetCurrentMonitor syn keyword raylibDrawing BeginDrawing EndDrawing ClearBackground BeginMode2D EndMode2D BeginMode3D EndMode3D BeginTextureMode EndTextureMode syn keyword raylibConstant WindowShouldClose IsWindowReady IsWindowFullscreen IsWindowHidden syn keyword raylibTiming SetTargetFPS GetFrameTime GetTime GetFPS syn keyword raylibInput IsKeyPressed IsKeyPressedRepeat IsKeyDown IsKeyReleased IsKeyUp GetKeyPressed GetCharPressed SetExitKey syn keyword raylibInput IsMouseButtonPressed IsMouseButtonDown IsMouseButtonReleased IsMouseButtonUp GetMouseX GetMouseY GetMousePosition GetMouseDelta syn keyword raylibShape DrawPixel DrawPixelV DrawLine DrawLineV DrawLineEx DrawCircle DrawRectangle DrawRectangleV DrawRectangleRec syn keyword raylibShape DrawFPS DrawText DrawTextEx DrawTextPro LoadFont LoadFontEx UnloadFont LoadUTF8 UnloadUTF8 hi raylibWindow ctermfg=White ctermbg=Black cterm=NONE hi raylibDrawing ctermfg=DarkCyan hi raylibConstant ctermfg=Magenta ctermbg=Black hi raylibTiming ctermfg=White ctermbg=darkYellow hi raylibInput ctermfg=DarkGreen ctermbg=Black hi raylibShape ctermfg=DarkGreen ==== 2. Keyword ==== We can set VIM syntax keyword by this command syn keyword (TITLE) [keyword1, keyword2, .....] You can find [[https://github.com/raysan5/raylib|Raylib]] keyword at [[https://www.raylib.com/cheatsheet/cheatsheet.html|Raylib CheatShet]]. ==== 3. color ==== Color setting is like this hi (TITLE) ctermfg=(COLOR) ctermbg=(COLOR) cterm=(NONE/BOLD) cterm : NONE / BOLD COLOR : You can find VIM Color constant at [[https://vi.stackexchange.com/questions/22635/ctermbg-and-ctermfg-are-backwards-or-incorrect-for-certain-highlighting-groups|this page.]] ===== Conclusion ===== Now we get an brillant Raylib Syntax Highlight for VIM Editor! {{:raylib:install:vimsyntaxforraylib.png?600|VIM Syntax for Raylib}}