From 64b4c545481b593d2859bfb3e1c10cd91742213f Mon Sep 17 00:00:00 2001 From: Bryan Ramos Date: Mon, 9 Mar 2026 15:49:32 -0400 Subject: [PATCH] Added README --- README.md | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..11bae6c --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +# Vim Config + +Lightweight vim config. + +## Install + +```bash +git clone git@github.com:itme-brain/vim.git ~/.vim +vim # plugins auto-install on first run +``` + +Requires `curl` and `git` for vim-plug bootstrap. On NixOS this is managed via home-manager instead. + +## How it works + +- Vim auto-loads `~/.vim/vimrc` — no symlinks needed +- [vim-plug](https://github.com/junegunn/vim-plug) auto-downloads itself via curl on first run if missing +- Missing plugins are installed with `PlugInstall --sync` on `VimEnter`, then the vimrc is re-sourced +- `silent! colorscheme` suppresses errors if the colorscheme hasn't been fetched yet (e.g. offline first run) +- Undo history persists to `~/.vim/undodir` across sessions (`undofile`) + +## Plugins + +| Plugin | What it does | +|--------|-------------| +| base16-vim | Colorscheme (onedark) | +| vim-surround | Surround text objects (`cs"'`, `ysiw]`) | +| auto-pairs | Auto-close brackets/quotes | +| fzf + fzf.vim | Fuzzy finder (files, buffers, grep) | +| vim-log-highlighting | Syntax highlighting for log files | +| vim-highlightedyank | Flash feedback on yank | +| lightline.vim | Statusline | +| vim-fugitive | Git commands (`:Git status`, `:Git blame`, etc.) | +| vim-signify | Git diff signs in the gutter | +| vim-anzu | Search match count in statusline | + +## Keybinds + +Leader is `Space`. + +### File explorer & search +| Key | Action | +|-----|--------| +| `e` | Toggle netrw sidebar | +| `/` | Ripgrep search | +| `ff` | Find files (fzf) | +| `fp` | Recent files (fzf) | +| `fb` | Open buffers (fzf) | +| `?` | Command history (fzf) | + +### Buffers +| Key | Action | +|-----|--------| +| `H` / `L` | Previous / next buffer | +| `bd` | Force close buffer | + +### Windows +| Key | Action | +|-----|--------| +| `` | Navigate windows (skips netrw) | +| `` | Resize windows | +| `wh` | Horizontal split | +| `wv` | Vertical split | +| `wd` | Close window | + +### Git +| Key | Action | +|-----|--------| +| `gs` | Git status | +| `gl` | Git log | +| `gd` | Git diff | +| `gb` | Git blame | +| `ga` | Git add | +| `gc` | Git commit | + +### Other +| Key | Action | +|-----|--------| +| `` | Clear search highlight | +| `` / `` | Scroll half-page (centered) | +| `<` / `>` (visual) | Indent and keep selection | +| `t` | Terminal (bottom split) | +| `ts` | Insert timestamp | +| `pu` | PlugUpdate | +| `pi` | PlugInstall |