# Welcome to Charvim! Charvim is a highly customized Neovim configuration designed to enhance productivity and provide a modern development experience. This wiki will help you get started with the basics of Vim and understand the custom features built into Charvim. ## How Vim Works Vim (and Neovim) is a **modal** editor. This means that the keys on your keyboard do different things depending on which "mode" you are in. ### The Four Main Modes 1. **Normal Mode**: The default mode. Used for navigation and running commands. Press `Esc` to return here from any other mode. 2. **Insert Mode**: Used for typing text. Enter this mode by pressing `i`, `a`, or `o`. 3. **Visual Mode**: Used for selecting blocks of text. Enter this mode by pressing `v` (character-wise), `V` (line-wise), or `Ctrl-v` (block-wise). 4. **Command-line Mode**: Used for saving, quitting, and searching. Enter this mode by typing `:` or `/` (for searching) from Normal mode. --- ## Basic Vim Motions & Commands Efficiency in Vim comes from staying in **Normal Mode** and using motions. ### 1. Basic Movement (The Home Row) Instead of arrow keys, use these to keep your hands centered: * `h`: Move left * `j`: Move down * `k`: Move up * `l`: Move right ### 2. Moving Within a Line * `w`: Jump forward to the start of the next **w**ord. * `b`: Jump **b**ackward to the start of the previous word. * `e`: Jump forward to the **e**nd of the word. * `0`: Jump to the absolute beginning of the line. * `$`: Jump to the end of the line. * `^`: Jump to the first non-blank character. **Charvim Customizations:** * `H`: Jump to the **beginning** of the line (replaces `0`). * `L`: Jump to the **end** of the line (replaces `$`). > [!TIP] > More custom navigation and line manipulation shortcuts can be found in the [charVim-Wiki.md](./charVim-Wiki.md) file. ### 3. Moving Within a File * `gg`: Go to the first line of the file. * `G`: Go to the last line of the file. * `{number}G`: Go to a specific line number (e.g., `10G`). * `Ctrl + d`: Scroll down half a page. * `Ctrl + u`: Scroll up half a page. ### 4. Basic Editing * `i`: **I**nsert before the cursor. * `a`: **A**ppend after the cursor. * `o`: **O**pen a new line below. * `x`: Delete the character under the cursor. * `u`: **U**ndo the last change. * `Ctrl + r`: **R**edo. ### 5. Operators + Motions You can combine operators with motions to perform actions: * `d`: Delete (e.g., `dw` deletes a word, `dd` deletes a line). * `y`: Yank/Copy (e.g., `yw` yanks a word, `yy` yanks a line). * `p`: Paste after the cursor. ### 6. Saving and Quitting * `:w`: Save (write) the file. * `:q`: Quit. * `:wq`: Save and quit. * `:q!`: Quit without saving. --- ## Customizations Please note that I have made extensive **customizations to the Neovim base** to fit my personal workflow and preferences. These include: * **LSP (Language Server Protocol)** for IDE-like features (autocompletion, go-to-definition). Servers: Lua, Python, TypeScript/JavaScript, Java (JDTLS), Kotlin, Go, C/C++, Swift, Typst, XML. * **Treesitter** for advanced syntax highlighting and incremental selection. * **Harpoon** for fast file navigation. * **Custom Keymaps** for common tasks (check `lua/keymaps.lua` in the config). * **Statusline & UI** enhancements for a cleaner look. * **Multi-cursor** support via a custom native implementation (`lua/multicursor.lua`). * **Find & Replace / Rename** panel with live preview, backed by `rg` with optional LSP rename (`lua/rename-config.lua`). * **AI assistance** via avante.nvim using Anthropic Claude (`claude-haiku-4-5`). * **Debugging** with DAP for Python, Java, C/C++, Swift, and Kotlin. For a detailed breakdown of all the specific customizations and how to use them, please visit the: 👉 **[Charvim Wiki - Detailed Customizations](https://github.com/CrtlUserKnown/Charvim/wiki/charVim-Wiki)**