{"id":15616267,"url":"https://github.com/ain/.vim","last_synced_at":"2025-04-28T13:09:06.591Z","repository":{"id":13829849,"uuid":"16526562","full_name":"ain/.vim","owner":"ain","description":"My living Vim stack on macOS","archived":false,"fork":false,"pushed_at":"2023-01-18T09:10:17.000Z","size":737,"stargazers_count":4,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-28T13:08:52.413Z","etag":null,"topics":["macos","macosx","vim","viml"],"latest_commit_sha":null,"homepage":"","language":"Vim Script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ain.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}},"created_at":"2014-02-04T21:41:44.000Z","updated_at":"2023-01-18T09:10:20.000Z","dependencies_parsed_at":"2023-02-10T14:00:34.145Z","dependency_job_id":null,"html_url":"https://github.com/ain/.vim","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ain%2F.vim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ain%2F.vim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ain%2F.vim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ain%2F.vim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ain","download_url":"https://codeload.github.com/ain/.vim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319607,"owners_count":21570427,"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":["macos","macosx","vim","viml"],"created_at":"2024-10-03T07:05:35.192Z","updated_at":"2025-04-28T13:09:06.362Z","avatar_url":"https://github.com/ain.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# My living Vim stack\n\nSubject to constant change, the goal of this repository is to store a polyglot coding environment setup for Vim.\n\n## Plugins\n\nSee [/plugged](https://github.com/ain/.vim/tree/master/plugged).\n\n## Dependencies\n\n1. Vim 8.2 (or newer) with Python 3.3 support. Install with `sudo port install vim +python33` (MacPorts)\n1. [ctags](http://ctags.sourceforge.net) for [tagbar](https://github.com/majutsushi/tagbar). Install with `sudo port install ctags` (MacPorts).\n2. [powerline-fonts](https://github.com/powerline/fonts) for [vim-airline](https://github.com/bling/vim-airline) advanced status bar and tabline.\n3. [JSCS](http://jscs.info). Install with `npm install -g jscs`.\n4. [pwgen](http://linux.die.net/man/1/pwgen). Install with Homebrew or MacPorts.\n5. `Nord-ain.terminal` profile (at the root of this repo)\n\n## Installation\n\n1. Clone\n\n        $ git clone https://github.com/ain/.vim.git\n\n2. Symlink Vim configuration to home folder\n\n        $ ln -s \u003cclone path\u003e/.vimrc ~/.vimrc\n\n3. Install `vim-plug`, see [installation guide](https://github.com/junegunn/vim-plug#installation)\n3. Install plugins by running `:PlugInstall` in Vim\n4. Install [language servers](https://github.com/neoclide/coc.nvim/wiki/Language-servers#contents), e.g. `:CocInstall coc-json coc-tsserver` for JavaScript\n5. Install `Nord-ain.terminal` as new `Terminal.app` profile and activate\n6. Install the downloaded Powerline font, e.g. _Cousine for Powerline_\n6. Select font in the added `Nord-ain.terminal` profile to match the downloaded Powerline font\n\n## Updates\n\nRun `PlugUpdate` in Vim.\n\n## Cheatsheet\n\n| Vim command                 |  Description                                                                                        |\n| -------------               | -----------------                                                                                   |\n| `gg=G`                      | Fix indentation                                                                                     |\n| `dG`                        | Delete till EOF                                                                                     |\n| `:w !pbcopy`                | Copy entire buffer to pasteboard                                                                    |\n| `\"ay`                       | Copy to _a_ register                                                                                |\n| `\"ap`                       | Paste from _a_ register                                                                             |\n| `F8`                        | Launch tagbar                                                                                       |\n| `za`                        | Fold block                                                                                          |\n| `z\u003cShift\u003er`                 | Unfold all blocks                                                                                   |\n| __tabular__                 |\n|  `:Tabularize /\u003cregex\u003e`     | Tabularise data by regular expression                                                               |\n| __Surroundings__            |\n| `ds\"`                       | Remove double quotes on word under cursor                                                           |\n| `cs\"'`                      | Replace double quotes with single quotes on word under cursor                                       |\n| `ysiw'`                     | Add single quotes on word under cursor                                                              |\n| __NERDCommenter__           |\n| `,cn`                       | Comment line or block                                                                               |\n| `,ci`                       | Toggle comment on line or block                                                                     |\n| __vim-fugitive + Git__       |\n| `ce`                         | In git status (`:Git`), amend staged files to last commit |\n| `:Gread \u003cbranch\u003e:\u003cfile\u003e`     | Read file fom another branch into current buffer, e.g. `:Gread master:%` for the same file in `master` | \n| `:Gbranches`                 | Display Git branches with their tracked remotes, incl. current Git branch                           |\n| `:Grmbranches`               | Remove all local branches exc. master                                                               |\n| `:Grmrbranches`              | Remove all remote branches exc. master                                                              |\n| `:Git`                       | Display Git status                                                                                  |\n| `:Greset`                    | Hard reset back to HEAD                                                                             |\n| `:Gurl`                      | Display remote origin URL                                                                           |\n| `:Gpusho`                    | Push current branch to origin autosetting upstream                                                  |\n| `:Gpushu`                    | Push current branch to origin autosetting upstream                                                  |\n| `:Gpushf`                    | Force-push current branch to origin                                                                 |\n| `:Gpushfu`                   | Force-push current branch to upstream                                                               |\n| `:Gpullo`                    | Pull current branch from origin with rebase                                                         |\n| `:Gpullu`                    | Pull current branch from upstream with rebase                                                       |\n| `:Gglog`                     | Global log with stat                                                                                |\n| `:Gdlog`                     | Global decorated log with stat highlighting branches                                                |\n| `:Gflog`                     | Detailed log of file in buffer                                                                      |\n| `:Gblog`                     | Current branch log                                                                                  |\n| `:Gclean`                    | Remove newly created files                                                                          |\n| `:Grebuild`                  | Empty commit with message `Rebuild`, e.g. for CI systems                                            |\n| `:Gtags`                     | List all tags with description (`git tag -l -n1`)                                                   |\n| `:Gcotag`                    | Display tag that is currently checked out (`git name-rev --tags --name-only $(git rev-parse HEAD)`) |\n| `:Gpr \u003cremote\u003e \u003cID\u003e`         | Fetch and checkout Pull Request from remote by ID                                                   |\n| `:Gbranchd \u003cbranch\u003e`         | Delete branch locally and at origin                                                                 |\n| __Utilities__                |\n| `:Md5`                       | MD5 checksum of file in active buffer                                                               |\n| `:Tstamp`                    | Insert UNIX timestamp at cursor                                                                     |  \n| `:Pwd`                       | Insert 12-char alphanumeric password at cursor                                                      |  \n| __coc.nvim__                 |\n| `:CocInstall \u003cextension\u003e`    | Install coc extension for code completion\n| __vim-plug__                 |\n| `:PlugInstall`               | Install all plugins described in `.vimrc`                                                           |\n| `:PlugUpdate`                | Update all plugins described in `.vimrc`. See [complete list of commands](https://github.com/junegunn/vim-plug/blob/master/README.md#commands) |\n\n## Tips\n\n1. Disabling PressAndHold feature on Mac OS X Yosemite (or greater) to restore key repeat: `defaults write com.apple.Terminal ApplePressAndHoldEnabled -bool false`\n\n### GPG-signed commits on GitHub\n\n1. Install [GPG Suite](https://gpgtools.org)\n2. Create key in GPG Keychain\n3. Export newly created key __without secret__\n4. Copy key content to GitHub (_Settings_ \u003e _SSH and GPG keys_ \u003e _New GPG key_)\n5. Configure signature locally, see [Telling Git about your GPG key](https://help.github.com/articles/telling-git-about-your-gpg-key/)\n6. Let all commits be signed\n\n        $ git config --global commit.gpgsign true\n\n## Useful resources\n\n- [vim tips and tricks](http://www.cs.swarthmore.edu/help/vim/home.html)\n- [vim-fugitive doc](https://raw.githubusercontent.com/tpope/vim-fugitive/master/doc/fugitive.txt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fain%2F.vim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fain%2F.vim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fain%2F.vim/lists"}