{"id":20858867,"url":"https://github.com/huyz/dot-vim","last_synced_at":"2025-12-11T19:23:25.018Z","repository":{"id":1564481,"uuid":"1987118","full_name":"huyz/dot-vim","owner":"huyz","description":".vim","archived":false,"fork":false,"pushed_at":"2024-03-30T14:29:01.000Z","size":502,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-30T18:34:45.256Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Quadral/335source","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/huyz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2011-07-02T09:18:58.000Z","updated_at":"2024-04-14T16:54:40.368Z","dependencies_parsed_at":"2024-03-09T16:27:38.060Z","dependency_job_id":"ed6cab9c-036c-41f8-819e-15b0b10b4563","html_url":"https://github.com/huyz/dot-vim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huyz%2Fdot-vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huyz%2Fdot-vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huyz%2Fdot-vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huyz%2Fdot-vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huyz","download_url":"https://codeload.github.com/huyz/dot-vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243230100,"owners_count":20257644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T04:47:48.634Z","updated_at":"2025-12-11T19:23:25.010Z","avatar_url":"https://github.com/huyz.png","language":"Vim Script","readme":"# Files\n\n| File          | Description                                                                                                        |\n| ------------- | ------------------------------------------------------------------------------------------------------------------ |\n| `.exrc`       | basic initialization file for the original ex/vi, in case vim isn't installed. It has to be symlinked to `~/.exrc` |\n| `.vimrc`      | main initialization file. It has to be symlinked to `~/.vimrc`                                                     |\n| `.vimrc.post` | contains personal commands invoked after `.vimrc`. You can create this file with your own customizations here.     |\n| `setup.sh`    | sets up the files to be ready for vim.                                                                             |\n\n# Installation\n\nRequires:\n\n- curl\n- gpg [just for my private .vimrc.post.gpg]\n\n```\n[ -d ~/.vim ] \u0026\u0026 mv ~/.vim ~/.vim-OLD\ngit clone https://github.com/huyz/dot-vim.git .vim\ncd ~/.vim\n./setup.sh\n```\n\n# Mapping Quick Reference\n\n## General tips\n\nThese are useful commands that are easy to forget because they're needed only\noccasionally.\n\n| Mapping                                              | Description                                                                                                                                        |\n| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `cgn` + `.`                                          | Incrementally change matches                                                                                                                       |\n| `q:` `q/` `q?`                                       | Open comand-line window (`^F` if already in command-line)                                                                                          |\n| `` \\`. ``                                            | Jump to last modification                                                                                                                          |\n| `gv`                                                 | Reselect last visual selection                                                                                                                     |\n| `ga`                                                 | ASCII/Unicode value of current character                                                                                                           |\n| `gP` then `.`…                                       | Paste successively                                                                                                                                 |\n| `viw` `cis` `dap` `yab` `ci'` `cit` `dat` `` ci`  `` | Operations on word, inner sentence, paragraph, () block, quoted strings, html tags                                                                 |\n| `/\u003cC-R\u003e\u003cC-W\u003e`                                        | Pull current word into search                                                                                                                      |\n| `/\u003cC-R\u003e\"`                                            | Pull in last yank                                                                                                                                  |\n| `[I`                                                 | Show lines that match current word                                                                                                                 |\n| `` `[ `` or `` `]``                                  | Go to beginning/end of last change                                                                                                                 |\n| `\u003cC-X\u003e\u003cC-L\u003e`                                         | Starts line completion                                                                                                                             |\n| `\u003cC-X\u003e\u003cC-K\u003e`                                         | Starts dictionary completion                                                                                                                       |\n| `==`                                                 | Reindent line(s)                                                                                                                                   |\n| `:ce`                                                | Center line(s)                                                                                                                                     |\n| `!!date`                                             | Replace current line with date (different from my `\\-d`)                                                                                           |\n| `:-1r`                                               | Read in file above current line                                                                                                                    |\n| `:argdo %s/f//`                                      | Operate over all files listed on command line                                                                                                      |\n| `:windo %s/f//`                                      | Operate over all viewable split windows                                                                                                            |\n| `:bufdo normal :%s,^,^R%,^M`                         | perform an operation on all buffers when a register needs to be accessed (note that ^R ^M are typed by hitting control-v and then control-r or -m) |\n| `:bufdo exe \"normal :%s,^,\\\u003cC-R\u003e%,\\\u003cCR\u003e\"`            | same as above                                                                                                                                      |\n| `:verbose set history?`                              | Find where an option is set                                                                                                                        |\n| `:w !sudo tee %`                                     | Save the current file with sudo privileges                                                                                                         |\n\n## My own mappings\n\nI tend to forgot I defined these mappings:\n\n| Mapping                  | Description                                                                     |\n| ------------------------ | ------------------------------------------------------------------------------- |\n| `\u003cC-s\u003e`                  | Save buffer                                                                     |\n| `\u003cC-q\u003e\u003cC-s\u003e`             | Save buffer and reload configs                                                  |\n| `\u003cC-q\u003e\u003cC-r\u003e`             | Reload configs                                                                  |\n| `ZA`                     | Exit vim but prompt for unsaved buffers                                         |\n| `ZM`                     | Save even if nomodifiable (and preserve nomodifiable, thus overriding modeline) |\n| `gb`                     | Re-select last pasted block                                                     |\n| `Q` `gq` `\u003cM-q\u003e`         | In visual mode, format by `par`, vim                                            |\n| `\u003cM-f\u003e\u003cC-S-BS\u003e`          | Discard consecutive blank lines                                                 |\n| `\u003cM-x\u003e#-` or `#=` or`#~` | Underline line                                                                  |\n| `\u003cD-M-S--\u003e` `\u003cD-M-S-+\u003e`  | Increment/decrement (all-mode alternative to `\u003cC-a\u003e` and `\u003cC-x\u003e`)               |\n| i\\_`\u003cC-s\u003e`               | Swap last two characters (my own function)                                      |\n\n## Plugins I installed\n\n### windowswap\n\n| Mapping | Description                        |\n| ------- | ---------------------------------- |\n| `\\ww`   | Set first or second window to swap |\n\n### Bbye\n\n| Mapping      | Description                                  |\n| ------------ | -------------------------------------------- |\n| `\u003cC-q\u003e\u003cC-w\u003e` | Close buffer without messing up split window |\n\n### visual-multi\n\n| Mapping            | Description                                                    |\n| ------------------ | -------------------------------------------------------------- |\n| `\u003cC-n\u003e` or `n`     | Select word at cursor, or next occurrence of current selection |\n| `\u003cC-S-n\u003e` or `N`   | Select previous occurrence of current selection                |\n| `\u003cM-q\u003e` or `q`     | Skip current occurrence                                        |\n| `\u003cM-S-Q\u003e` or `Q`   | Unselect occurrence                                            |\n| `\u003cM-S-G\u003e` or `\\\\A` | Select all occurrences                                         |\n| `\u003cM-S-/\u003e` or `\\\\/` | Select by regex                                                |\n| `\u003cC-Down\u003e`         | Add cursor(s) vertically                                       |\n| `\\\\S` or `\\\\gS`    | Reselect last                                                  |\n\n### easymotion (for vim)\n\n| Mapping | Description                                       |\n| ------- | ------------------------------------------------- |\n| `-abc`  | Highlight n-character matches                     |\n| `__`    | Go to previous n-character match                  |\n| `_+`    | Go to next n-character match                      |\n| `\\\\w`   | Highlight consecutive targets of word motion      |\n| `\\\\t`   | Highlight consecutive targets of character motion |\n\n### hop (for neovim)\n\n| Mapping             | Description                         |\n| ------------------- | ----------------------------------- |\n| `-ab`               | Highlight 2-character matches       |\n| `_f` `_F` `_t` `_T` | Find next character on current line |\n| `\u003cC-;\u003e`             | Hop to pattern                      |\n\n### CamelCaseMotion\n\n| Mapping                 | Description                                               |\n| ----------------------- | --------------------------------------------------------- |\n| `,w` `,b` `,e`          | like regular motions but respecting word boundaries       |\n| `ci,w` `di,w`           | like regular change/delete but respecting word boundaries |\n| `c2i,b` `y2i,b` `v2i,b` | change/yank/select the current word and previous word     |\n\n### surround\n\n| Mapping   | Description                                                        |\n| --------- | ------------------------------------------------------------------ |\n| `ysiw'`   | surround inner word with single quotes                             |\n| `yss)`    | surround sentence with parentheses and no space                    |\n| `ys2w(`   | surround next 2 words with parentheses and spaces                  |\n| `ySS{`    | surround sentence with braces on their own lines                   |\n| v\\_`S{`   | in line visual mode, surround lines with braces on their own lines |\n| v\\_`gS\\|` | in block visual mode, surround each line with bars, with alignment |\n| `dst`     | delete surrounding tags                                            |\n| `cs't`    | change surrounding quotes to tag with prompt                       |\n| `csw(`    | shortcut for `ysiw(`                                               |\n\nMy more concise shortcuts:\n\n| Mapping  | Description                                      |\n| -------- | ------------------------------------------------ |\n| ``ys` `` | surround inner word with backticks               |\n| `yS*`    | surround outer word with `**` markdown bold `**` |\n| v\\_`sw`  | surround with `[[` wikilink `]]`                 |\n\n### vim-switch\n\n| Mapping | Description                                |\n| ------- | ------------------------------------------ |\n| `\u003cC-z\u003e` | Toggle value (to match `\u003cC-a\u003e` and `\u003cC-x\u003e` |\n\n### vim-move\n\n| Mapping    | Description                           |\n| ---------- | ------------------------------------- |\n| `\u003cM-Up\u003e`   | Move current character/selection up   |\n| `\u003cM-Left\u003e` | Move current character/selection left |\n\n### easy-align\n\n| Mapping   | Description                                                    |\n| --------- | -------------------------------------------------------------- |\n| V\\_`gA= ` | in line visual mode, start aligning around first `=` character |\n| `gAip=`   | start aligning for inner paragraph                             |\n| V\\_`\\\\`   | In Github-Flavored Markdown file, re-align current table       |\n\n### ReplaceWithRegister\n\n| Mapping      | Description                         |\n| ------------ | ----------------------------------- |\n| `gr{motion}` | Replace {motion} text with register |\n| `grr`        | Replace line(s) with register       |\n\n### abolish\n\n| Mapping    | Description                 |\n| ---------- | --------------------------- |\n| `:Subvert` | case-preserving subsitution |\n\n### eregex\n\n| Mapping  | Description        |\n| -------- | ------------------ |\n| `:S///`  | PCRE2 substitution |\n| `\u003cM-s\u003e/` | Toggle PCRE search |\n\n### exchange\n\n| Mapping Description |                                            |\n| ------------------- | ------------------------------------------ |\n| `cx{motion}`        | Sets first or second text to swap/exchange |\n| `cxx`               | Sets first or second line to swap/exchange |\n| `cxx`               | Sets first or second line to swap/exchange |\n| `\u003cM-x\u003e\u003cM-x\u003e`        | Swap last two words (my own function)      |\n\n### argumentative\n\n| Mapping       | Description                   |\n| ------------- | ----------------------------- |\n| `⇧⌥.` or `\u003c.` | Shift function argument right |\n\n### targets\n\n| Mapping | Description              |\n| ------- | ------------------------ |\n| `cia`   | Change function argument |\n| `daa`   | Delete function argument |\n\n### indent-object (useful for Python)\n\n| Mapping | Description                                                        |\n| ------- | ------------------------------------------------------------------ |\n| `vai`   | Select indentation level + line above                              |\n| `vii`   | Select indentation level                                           |\n| `vaI`   | Select idnentation level + line below (useful for closing bracket) |\n\n### table-mode\n\n| Mapping  | Description       |\n| -------- | ----------------- |\n| `\u003cM-m\u003ef` | Reformat table    |\n| `\u003cM-m\u003et` | Toggle table mode |\n| `\u003cM-m\u003ei` | Insert column     |\n| `\u003cM-m\u003ea` | Append column     |\n| `\u003cM-m\u003ex` | Delete column     |\n| `\u003cM-m\u003ed` | Delete row        |\n\n### splitjoin\n\n| Mapping | Description                            |\n| ------- | -------------------------------------- |\n| `gS`    | Trigger smart split wherever cursor is |\n| `gJ`    | Trigger smart join wherever cursor is  |\n\n### gitmoji\n\n| Mapping  | Description                              |\n| -------- | ---------------------------------------- |\n| `\u003cM-c\u003e:` | Trigger completion                       |\n| `\\\\^U`   | Convert :emoji_name: into unicode emojis |\n\n## Development using native LSP\n\n### nvim-cmp\n\n| Mapping              | Description                              |\n| --------             | ---------------------------------------- |\n| `\u003cC-Space\u003e`          | Show completion pop-up                   |\n| `\u003cC-e\u003e`              | Hide completion pop-up                   |\n| `\u003cC-y\u003e` or `\u003cEnter\u003e` | Accept pop-up completion                 |\n| `\u003cC-p\u003e`              | Previous pop-up completion               |\n| `\u003cC-n\u003e`              | Next pop-up completion                   |\n\n# Development using CoC\n\n| Mapping              | Description                                           |\n| --------             | ----------------------------------------              |\n| `\u003cC-Space\u003e`          | Show completion pop-up (after typing some characters) |\n| `\u003cC-e\u003e`              | Hide completion pop-up                                |\n| `\u003cC-y\u003e` or `\u003cEnter\u003e` | Accept pop-up completion                              |\n| `\u003cC-p\u003e`              | Previous pop-up completion                            |\n| `\u003cC-n\u003e`              | Next pop-up completion                                |\n\n# Development using GitHub Copilot\n\n| Mapping     | Description                              |\n| --------    | ---------------------------------------- |\n| `\u003cM-\\\\\u003e`    | Trigger suggestion                       |\n| `\u003cTab\u003e`     | Accept suggestion                        |\n| `\u003cM-[\u003e`     | Previous suggestion                      |\n| `\u003cM-]\u003e`     | Next suggestion                          |\n| `\u003cM-Right\u003e` | Next suggestion                          |\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuyz%2Fdot-vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuyz%2Fdot-vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuyz%2Fdot-vim/lists"}