An open API service indexing awesome lists of open source software.

https://github.com/siddarthvader/nvim

nvim config
https://github.com/siddarthvader/nvim

Last synced: about 1 month ago
JSON representation

nvim config

Awesome Lists containing this project

README

        

# Neovim Keymap README

This README provides a comprehensive list of custom keymaps defined in your Neovim configuration. These keymaps are designed to enhance your productivity and streamline your workflow in Neovim.

## General Keymaps

- ``: Leader key

### AI Assistant (Avante)

- ``: Submit text to Avante AI assistant (in insert mode)
- `aa`: Show sidebar
- `at`: Toggle sidebar visibility
- `ar`: Refresh sidebar
- `af`: Switch sidebar focus
- `a?`: Select model
- `ae`: Edit selected blocks
- `co`: Choose ours (conflict resolution)
- `ct`: Choose theirs (conflict resolution)
- `ca`: Choose all theirs (conflict resolution)
- `c0`: Choose none (conflict resolution)
- `cb`: Choose both (conflict resolution)
- `cc`: Choose cursor (conflict resolution)
- `]x`: Move to previous conflict
- `[x`: Move to next conflict
- `[[`: Jump to previous codeblocks (results window)
- `]]`: Jump to next codeblocks (results windows)

### File Operations

- `s`: Save file (files are also auto-saved on InsertLeave and TextChanged)
- `ff`: Format file
- `cR`: Rename current file
- `bd`: Delete buffer

### Window Navigation

- ``: Move to the window above
- ``: Move to the window below
- ``: Move to the window on the left
- ``: Move to the window on the right

### Yanky Plugin Keymaps

- `p`: Put (paste) after cursor (normal and visual mode)
- `P`: Put (paste) before cursor (normal and visual mode)
- `gp`: Put (paste) after cursor and leave cursor after new text (normal and visual mode)
- `gP`: Put (paste) before cursor and leave cursor after new text (normal and visual mode)
- ``: Cycle to previous yanked text
- ``: Cycle to next yanked text

### Terminal Mode Keymaps

- `` or `jk`: Exit terminal mode
- ``: Move to the window on the left
- ``: Move to the window below
- ``: Move to the window above
- ``: Move to the window on the right
- ``: Enter window command mode
- `` or ``: Toggle terminal

### Neo-tree Keymaps

- `e`: Open file explorer
- `m`: Close Neo-tree

### Search and Navigation (snacks.nvim)

#### Quick Access
- ``: Smart find files
- `/`: Quick grep search
- `,`: Browse buffers
- `:`: Command history

#### File Finding
- `fb`: Browse buffers
- `fc`: Find config file
- `fg`: Find git files
- `fp`: Browse projects
- `fr`: Recent files

#### Search Operations
- `sg`: Grep search in project
- `sw`: Search word under cursor/visual selection
- `sb`: Search in buffer lines
- `sB`: Grep in open buffers
- `s/`: Search history
- `sd`: Search diagnostics
- `sD`: Search buffer diagnostics
- `sh`: Search help pages
- `sk`: Search keymaps
- `ss`: Search LSP symbols
- `sS`: Search LSP workspace symbols

#### Git Operations
- `gl`: Git log
- `gL`: Git log for current line
- `gs`: Git status
- `gd`: Git diff (hunks)
- `gf`: Git log for current file
- `gb`: Git blame line
- `gg`: Open Lazygit
- `gB`: Git browse (normal and visual mode)

### In-File Search

#### Quick Search
- `/`: Search forward in file (type search term and press Enter)
- `?`: Search backward in file (type search term and press Enter)
- `n`: Go to next match
- `N`: Go to previous match
- `` or `:noh`: Clear search highlighting

#### Buffer Search (snacks.nvim)
- `sb`: Search lines in current buffer
- `sw`: Search for word under cursor or visual selection
- `sB`: Grep search in open buffers
- `s/`: View search history

### LSP Keymaps

- `K`: Hover information
- `d`: Show diagnostics at cursor
- `gd`: Go to definition
- `gD`: Go to declaration
- `gr`: Go to references
- `gI`: Go to implementation
- `gy`: Go to type definition
- `ca`: Code action
- `rn`: Rename

### Toggle Options

- `us`: Toggle spelling
- `uw`: Toggle word wrap
- `uL`: Toggle relative line numbers
- `ud`: Toggle diagnostics
- `ul`: Toggle line numbers
- `uc`: Toggle conceallevel
- `uT`: Toggle treesitter
- `ub`: Toggle dark/light background
- `uh`: Toggle inlay hints
- `ug`: Toggle indent guides
- `uD`: Toggle dim

### Editor Settings

- Line numbers are enabled (both absolute and relative)
- Tab width is set to 2 spaces
- System clipboard is used by default
- Files with `.templ` extension are automatically formatted on save

## Notes

- The clipboard is set to use the system clipboard (`unnamed`).
- File format is automatically set for `.templ` files.
- Some keymaps may depend on specific plugins (e.g., snacks.nvim) being installed and configured.
- LSP keymaps typically require additional setup with nvim-lspconfig or similar plugins. If these aren't working, you may need to configure them in your Neovim setup.

Remember that you can always check your current keymaps in Neovim by using the `:map` command. As you become more familiar with Neovim, you may want to modify or add new keymaps to suit your workflow.