{"id":13400527,"url":"https://github.com/amix/vimrc","last_synced_at":"2026-01-28T16:01:38.912Z","repository":{"id":3432398,"uuid":"4484451","full_name":"amix/vimrc","owner":"amix","description":"The ultimate Vim configuration (vimrc)","archived":false,"fork":false,"pushed_at":"2024-10-06T08:26:02.000Z","size":32472,"stargazers_count":31100,"open_issues_count":12,"forks_count":7311,"subscribers_count":781,"default_branch":"master","last_synced_at":"2025-03-18T02:23:57.394Z","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":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2012-05-29T16:19:29.000Z","updated_at":"2025-03-17T23:09:06.000Z","dependencies_parsed_at":"2024-09-21T06:00:56.710Z","dependency_job_id":"506f2421-0267-4b85-bebf-322246479f87","html_url":"https://github.com/amix/vimrc","commit_stats":{"total_commits":378,"total_committers":92,"mean_commits":4.108695652173913,"dds":0.537037037037037,"last_synced_commit":"2b653aa95025e29546fbd9b066931b7d90954fa9"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/amix/vimrc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amix%2Fvimrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amix%2Fvimrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amix%2Fvimrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amix%2Fvimrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amix","download_url":"https://codeload.github.com/amix/vimrc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amix%2Fvimrc/sbom","scorecard":{"id":190003,"data":{"date":"2025-08-11","repo":{"name":"github.com/amix/vimrc","commit":"46294d589d15d2e7308cf76c58f2df49bbec31e8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.8,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":3,"reason":"Found 10/30 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Binary-Artifacts","score":0,"reason":"binaries present in source code","details":["Warn: binary detected: sources_non_forked/copilot.vim/dist/compiled/darwin/arm64/kerberos.node:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/compiled/darwin/x64/kerberos.node:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/compiled/linux/arm64/kerberos.node:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/compiled/linux/x64/kerberos.node:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/compiled/win32/x64/kerberos.node:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/crypt32.node:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/tree-sitter-go.wasm:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/tree-sitter-javascript.wasm:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/tree-sitter-python.wasm:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/tree-sitter-ruby.wasm:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/tree-sitter-tsx.wasm:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/tree-sitter-typescript.wasm:1","Warn: binary detected: sources_non_forked/copilot.vim/dist/tree-sitter.wasm:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-jppv-gw3r-w3q8"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: sources_non_forked/rust.vim/test/Dockerfile:3: pin your Docker image by updating alonid/vim-testbed:10 to alonid/vim-testbed:10@sha256:339028fda386de57942a82152b184171105fc1f32c8edaebed3b289a64543a98","Warn: containerImage not pinned by hash: sources_non_forked/vim-python-pep8-indent/Dockerfile:1: pin your Docker image by updating testbed/vim:latest to testbed/vim:latest@sha256:e4aa605bc5aff03f2d3d20a1946c7d4a02f4af61b3f1c479697ac95dec97d0ed","Warn: pipCommand not pinned by hash: sources_non_forked/rust.vim/test/Dockerfile:21","Warn: downloadThenRun not pinned by hash: sources_non_forked/rust.vim/test/Dockerfile:23","Warn: pipCommand not pinned by hash: sources_non_forked/vim-python-pep8-indent/Dockerfile:14-16","Info:   0 out of   2 containerImage dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned","Info:   0 out of   1 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T20:28:30.554Z","repository_id":3432398,"created_at":"2025-08-16T20:28:30.554Z","updated_at":"2025-08-16T20:28:30.554Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28846754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-07-30T19:00:52.964Z","updated_at":"2026-01-28T16:01:38.896Z","avatar_url":"https://github.com/amix.png","language":"Vim Script","readme":"![VIM](https://dnp4pehkvoo6n.cloudfront.net/43c5af597bd5c1a64eb1829f011c208f/as/Ultimate%20Vimrc.svg)\n\n# The Ultimate vimrc\n\nOver the last 10 years, I have used and tweaked Vim. This configuration is the ultimate vimrc (or at least my version of it).\n\nThere are two versions:\n\n* **The Basic**: If you want something small just copy [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim) into your ~/.vimrc and you will have a good basic setup\n* **The Awesome**: Includes a ton of useful plugins, color schemes, and configurations\n\nI would, of course, recommend using the awesome version.\n\n\n## How to install the Awesome version?\n### Install for your own user only\nThe awesome version includes a lot of great plugins, configurations and color schemes that make Vim a lot better. To install it simply do following from your terminal:\n\n\tgit clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime\n\tsh ~/.vim_runtime/install_awesome_vimrc.sh\n\t\n### Install for multiple users\nTo install for multiple users, the repository needs to be cloned to a location accessible for all the intended users.\n\n\tgit clone --depth=1 https://github.com/amix/vimrc.git /opt/vim_runtime\n\tsh /opt/vim_runtime/install_awesome_parameterized.sh /opt/vim_runtime user0 user1 user2\n\t# to install for all users with home directories, note that root will not be included\n\tsh /opt/vim_runtime/install_awesome_parameterized.sh /opt/vim_runtime --all\n\t\nNaturally, `/opt/vim_runtime` can be any directory, as long as all the users specified have read access.\n\n## Fonts\n\nI recommend using [IBM Plex Mono font](https://github.com/IBM/plex) (it's an open-source and awesome font that can make your code look beautiful). The Awesome vimrc is already setup to try to use it.\n\nSome other fonts that Awesome will try to use:\n\n* [Hack](http://sourcefoundry.org/hack/)\n* [Source Code Pro](https://adobe-fonts.github.io/source-code-pro/)\n\n## How to install the Basic version?\n\nThe basic version is just one file and no plugins. Just copy [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim) and paste it into your vimrc.\n\nThe basic version is useful to install on remote servers where you don't need many plugins, and you don't do many edits.\n\n\tgit clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime\n\tsh ~/.vim_runtime/install_basic_vimrc.sh\n\n\n## How to install on Windows?\n\nUse [gitforwindows](http://gitforwindows.org/) to checkout the repository and run the installation instructions above. No special instructions needed ;-)\n\n\n## How to install on Linux\n\nIf you have vim aliased as `vi` instead of `vim`, make sure to either alias it: `alias vi=vim`. Otherwise, `apt-get install vim`\n\n\n## How to update to latest version?\n\nJust do a git rebase!\n\n\n    cd ~/.vim_runtime\n    git reset --hard\n    git clean -d --force\n    git pull --rebase\n    python update_plugins.py  # use python3 if python is unavailable\n\n## Some screenshots\n\nColors when editing a Python file:\n\n![Screenshot 1](https://dnp4pehkvoo6n.cloudfront.net/07583008e4da885801657e8781777844/as/Python%20editing.png)\n\n[NERD Tree](https://github.com/preservim/nerdtree) plugin in a terminal window:\n![Screenshot 3](https://dnp4pehkvoo6n.cloudfront.net/ae719203166585d64728f28398f4b1b7/as/Terminal%20usage.png)\n\nDistraction free mode using [goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2):\n![Screenshot 4](https://dnp4pehkvoo6n.cloudfront.net/f0dcc4c9739148c56cbf8285a910ac41/as/Zen%20mode.png)\n\n\n## Included Plugins\n\nI recommend reading the docs of these plugins to understand them better. Each plugin provides a much better Vim experience!\n\n* [ack.vim](https://github.com/mileszs/ack.vim): Vim plugin for `the_silver_searcher` (ag) or ack -- a wicked fast grep\n* [bufexplorer.zip](https://github.com/vim-scripts/bufexplorer.zip): Quickly and easily switch between buffers. This plugin can be opened with `\u003cleader+o\u003e`\n* [ctrlp.vim](https://github.com/ctrlpvim/ctrlp.vim): Fuzzy file, buffer, mru and tag finder. It's mapped to `\u003cCtrl+F\u003e`\n* [goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2): \n* [lightline.vim](https://github.com/itchyny/lightline.vim): A light and configurable statusline/tabline for Vim\n* [NERD Tree](https://github.com/preservim/nerdtree): A tree explorer plugin for vim\n* [open_file_under_cursor.vim](https://github.com/amix/open_file_under_cursor.vim): Open file under cursor when pressing `gf`\n* [pathogen.vim](https://github.com/tpope/vim-pathogen): Manage your vim runtimepath \n* [snipmate.vim](https://github.com/garbas/vim-snipmate): snipmate.vim aims to be a concise vim script that implements some of TextMate's snippets features in Vim\n* [ale](https://github.com/dense-analysis/ale): Syntax and lint checking for vim (ALE requires NeoVim \u003e= 0.2.0 or Vim 8 with +timers +job +channel)\n* [vim-commentary](https://github.com/tpope/vim-commentary): Comment stuff out.  Use `gcc` to comment out a line (takes a count), `gc` to comment out the target of a motion. `gcu` uncomments a set of adjacent commented lines\n* [vim-expand-region](https://github.com/terryma/vim-expand-region): Allows you to visually select increasingly larger regions of text using the same key combination\n* [vim-fugitive](https://github.com/tpope/vim-fugitive): A Git wrapper so awesome, it should be illegal\n* [vim-indent-object](https://github.com/michaeljsmith/vim-indent-object): Defines a new text object representing lines of code at the same indent level. Useful for python/vim scripts\n* [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors): Sublime Text style multiple selections for Vim, CTRL+N is remapped to CTRL+S (due to YankRing)\n* [vim-yankstack](https://github.com/maxbrunsfeld/vim-yankstack): Maintains a history of previous yanks, changes and deletes\n* [vim-zenroom2](https://github.com/amix/vim-zenroom2) Remove all clutter and focus only on the essential. Similar to iA Writer or Write Room\n* [gist-vim](https://github.com/mattn/gist-vim) Easily create gists from Vim using the `:Gist` command\n* [vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides) Is a plugin for visually displaying indent levels in Vim\n* [editorconfig-vim](https://github.com/editorconfig/editorconfig-vim) EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs\n* [copilot.vim](https://github.com/github/copilot.vim) Plugin for GitHub Copilot (AI autocompletion FTW 😅)\n\n\n## Included color schemes\n\nType `:colorscheme \u003cTab\u003e` to try out color schemes on the fly,\nor add the command to `~/.vim_runtime/my_configs.vim` (see [below](#how-to-include-your-own-stuff)),\nfor example `colorscheme pyte`.\n\n* [peaksea](https://github.com/vim-scripts/peaksea): The default\n* [dracula](https://github.com/dracula/vim)\n* [vim-colors-solarized](https://github.com/altercation/vim-colors-solarized)\n* [vim-irblack](https://github.com/wgibbs/vim-irblack)\n* [mayansmoke](https://github.com/vim-scripts/mayansmoke)\n* [vim-pyte](https://github.com/therubymug/vim-pyte)\n\n\n## Included modes\n\n* [vim-coffee-script](https://github.com/kchmck/vim-coffee-script)\n* [vim-less](https://github.com/groenewege/vim-less)\n* [vim-bundle-mako](https://github.com/sophacles/vim-bundle-mako)\n* [vim-markdown](https://github.com/plasticboy/vim-markdown)\n* [nginx.vim](https://github.com/vim-scripts/nginx.vim): Highlights configuration files for nginx\n* [rust.vim](https://github.com/rust-lang/rust.vim)\n* [vim-ruby](https://github.com/vim-ruby/vim-ruby)\n* [typescript-vim](https://github.com/leafgarland/typescript-vim)\n* [vim-javascript](https://github.com/pangloss/vim-javascript)\n* [vim-python-pep8-indent](https://github.com/Vimjas/vim-python-pep8-indent)\n\n\n## How to include your own stuff?\n\nAfter you have installed the setup,\ncreate an empty `~/.vim_runtime/my_configs.vim` file for further customization.\nThis file's syntax matches `vimrc` syntax,\nand add `vimrc` lines like `set number` as needed.\n\nFor instance, my `my_configs.vim` looks like this:\n\n\t~/.vim_runtime \u003e cat my_configs.vim\n\tmap \u003cleader\u003ect :cd ~/Desktop/Todoist/todoist\u003ccr\u003e\n\tmap \u003cleader\u003ecw :cd ~/Desktop/Wedoist/wedoist\u003ccr\u003e \n\nYou can also install your plugins, for instance, via pathogen you can install [vim-rails](https://github.com/tpope/vim-rails):\n\n\tcd ~/.vim_runtime\n\tgit clone git://github.com/tpope/vim-rails.git my_plugins/vim-rails\n\nYou can also install plugins without any plugin manager (vim 8+ required):\n\n* Create pack plugin directory:\\\n`mkdir -p ~/.vim_runtime/pack/plugins/start`\n* Clone the plugin that you want in that directory, for example:\\\n`git clone --depth=1 git://github.com/maxmellon/vim-jsx-pretty  ~/.vim_runtime/pack/plugins/start/vim-jsx-pretty`\n\n\n## Key Mappings\n\nThe [leader](http://learnvimscriptthehardway.stevelosh.com/chapters/06.html#leader) is `,`, so whenever you see `\u003cleader\u003e` it means `,`.\n\n\n### Normal mode mappings\n\nFast saving of a buffer (`\u003cleader\u003ew`):\n\n```vim\nnmap \u003cleader\u003ew :w!\u003ccr\u003e\n```\n\nMap `\u003cSpace\u003e` to `/` (search) and `\u003cCtrl\u003e+\u003cSpace\u003e` to `?` (backwards search):\n```vim\t\nmap \u003cspace\u003e /\nmap \u003cC-space\u003e ?\n```\nDisable highlights when you press `\u003cleader\u003e\u003ccr\u003e`:\n\n```vim\nmap \u003csilent\u003e \u003cleader\u003e\u003ccr\u003e :noh\u003ccr\u003e\n```\nSmart way to move between windows (`\u003cctrl\u003ej` etc.):\n```vim\t\nmap \u003cC-j\u003e \u003cC-W\u003ej\nmap \u003cC-k\u003e \u003cC-W\u003ek\nmap \u003cC-h\u003e \u003cC-W\u003eh\nmap \u003cC-l\u003e \u003cC-W\u003el\n```\nClosing of the current buffer(s) (`\u003cleader\u003ebd` and (`\u003cleader\u003eba`)):\n```vim\t\n\" Close current buffer\nmap \u003cleader\u003ebd :Bclose\u003ccr\u003e\n\n\" Close all buffers\nmap \u003cleader\u003eba :1,1000 bd!\u003ccr\u003e\n```\t\nUseful mappings for managing tabs:\n```vim\t\nmap \u003cleader\u003etn :tabnew\u003ccr\u003e\nmap \u003cleader\u003eto :tabonly\u003ccr\u003e\nmap \u003cleader\u003etc :tabclose\u003ccr\u003e\nmap \u003cleader\u003etm :tabmove \n\n\" Opens a new tab with the current buffer's path\n\" Super useful when editing files in the same directory\nmap \u003cleader\u003ete :tabedit \u003cC-r\u003e=escape(expand(\"%:p:h\"), \" \")\u003ccr\u003e/\n```\t\nSwitch [CWD](http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file) to the directory of the open buffer:\n```vim\t\nmap \u003cleader\u003ecd :cd %:p:h\u003ccr\u003e:pwd\u003ccr\u003e\n```\t\nOpen `ack.vim` for fast search:\n```vim\t\nmap \u003cleader\u003eg :Ack \n```\nQuickly open a buffer for scripbble:\n```vim\t\nmap \u003cleader\u003eq :e ~/buffer\u003ccr\u003e\n```\nToggle paste mode on and off:\n```vim\t\nmap \u003cleader\u003epp :setlocal paste!\u003ccr\u003e\n```\n\n### Visual mode mappings\n\nVisual mode pressing `*` or `#` searches for the current selection:\n```vim\nvnoremap \u003csilent\u003e * :call VisualSelection('f')\u003cCR\u003e\nvnoremap \u003csilent\u003e # :call VisualSelection('b')\u003cCR\u003e\n```\nWhen you press gv you `Ack.vim` after the selected text:\n```vim\nvnoremap \u003csilent\u003e gv :call VisualSelection('gv', '')\u003cCR\u003e\n```\nWhen you press `\u003cleader\u003er` you can search and replace the selected text:\n```vim\nvnoremap \u003csilent\u003e \u003cleader\u003er :call VisualSelection('replace')\u003cCR\u003e\n```\nSurround the visual selection in parenthesis/brackets/etc.:\n```vim\nvnoremap $1 \u003cesc\u003e`\u003ea)\u003cesc\u003e`\u003ci(\u003cesc\u003e\nvnoremap $2 \u003cesc\u003e`\u003ea]\u003cesc\u003e`\u003ci[\u003cesc\u003e\nvnoremap $3 \u003cesc\u003e`\u003ea}\u003cesc\u003e`\u003ci{\u003cesc\u003e\nvnoremap $$ \u003cesc\u003e`\u003ea\"\u003cesc\u003e`\u003ci\"\u003cesc\u003e\nvnoremap $q \u003cesc\u003e`\u003ea'\u003cesc\u003e`\u003ci'\u003cesc\u003e\nvnoremap $e \u003cesc\u003e`\u003ea`\u003cesc\u003e`\u003ci`\u003cesc\u003e\n```\n\n### Insert mode mappings\n\nQuickly insert parenthesis/brackets/etc.:\n```vim\ninoremap $1 ()\u003cesc\u003ei\ninoremap $2 []\u003cesc\u003ei\ninoremap $3 {}\u003cesc\u003ei\ninoremap $4 {\u003cesc\u003eo}\u003cesc\u003eO\ninoremap $q ''\u003cesc\u003ei\ninoremap $e \"\"\u003cesc\u003ei\ninoremap $t \u003c\u003e\u003cesc\u003ei\n```\nInsert the current date and time (useful for timestamps):\n```vim\niab xdate \u003cC-r\u003e=strftime(\"%d/%m/%y %H:%M:%S\")\u003ccr\u003e\n```\n\n### Command line mappings\n\n$q is super useful when browsing on the command line. It deletes everything until the last slash:\n```vim\ncno $q \u003cC-\\\u003eeDeleteTillSlash()\u003ccr\u003e\n```\nBash like keys for the command line:\n```vim\ncnoremap \u003cC-A\u003e\t\t\u003cHome\u003e\ncnoremap \u003cC-E\u003e\t\t\u003cEnd\u003e\ncnoremap \u003cC-K\u003e\t\t\u003cC-U\u003e\n\ncnoremap \u003cC-P\u003e \u003cUp\u003e\ncnoremap \u003cC-N\u003e \u003cDown\u003e\n```\n\nWrite the file as sudo (works only on Unix). Super useful when you open a file and you don't have permissions to save your changes. [Vim tip](http://vim.wikia.com/wiki/Su-write):\n\n    :W \n\n### Plugin related mappings\n\nOpen [bufexplorer](https://github.com/vim-scripts/bufexplorer.zip) to see and manage the current buffers (`\u003cleader\u003eo`):\n```vim\nmap \u003cleader\u003eo :BufExplorer\u003ccr\u003e\n```\nOpen [ctrlp.vim](https://github.com/kien/ctrlp.vim) plugin to quickly find a file or a buffer (`\u003cleader\u003ej` or `\u003cctrl\u003ef`):\n```vim\n\" Quickly find and open a file in the CWD\nlet g:ctrlp_map = '\u003cC-f\u003e'\n\n\" Quickly find and open a recently opened file\nmap \u003cleader\u003ef :MRU\u003cCR\u003e\n\n\" Quickly find and open a buffer\nmap \u003cleader\u003eb :CtrlPBuffer\u003ccr\u003e\n```\n[NERD Tree](https://github.com/preservim/nerdtree) mappings:\n```vim\nmap \u003cleader\u003enn :NERDTreeToggle\u003ccr\u003e\nmap \u003cleader\u003enb :NERDTreeFromBookmark \nmap \u003cleader\u003enf :NERDTreeFind\u003ccr\u003e\n```\n[goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2) lets you only focus on one thing at a time. It removes all the distractions and centers the content. It has a special look when editing Markdown, reStructuredText and textfiles. It only has one mapping. (`\u003cleader\u003ez`)\n```vim\nmap \u003cleader\u003ez :Goyo\u003ccr\u003e\n```\n[vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors) mappings to manage multiple cursors at once:\n```vim\nlet g:multi_cursor_start_word_key      = '\u003cC-s\u003e'\nlet g:multi_cursor_select_all_word_key = '\u003cA-s\u003e'\nlet g:multi_cursor_start_key           = 'g\u003cC-s\u003e'\nlet g:multi_cursor_select_all_key      = 'g\u003cA-s\u003e'\nlet g:multi_cursor_next_key            = '\u003cC-s\u003e'\nlet g:multi_cursor_prev_key            = '\u003cC-p\u003e'\nlet g:multi_cursor_skip_key            = '\u003cC-x\u003e'\nlet g:multi_cursor_quit_key            = '\u003cEsc\u003e'\n```\n[vim-yankstack](https://github.com/maxbrunsfeld/vim-yankstack) mappings to manage the kill-ring (clipboard):\n```vim\nnmap \u003cC-p\u003e \u003cPlug\u003eyankstack_substitute_older_paste\nnmap \u003cC-n\u003e \u003cPlug\u003eyankstack_substitute_newer_paste\n```\n[ctrl-p](https://github.com/ctrlpvim/ctrlp.vim) mappings to easily find and open a file, buffer, etc.:\n```vim\nlet g:ctrlp_map = '\u003cC-f\u003e'\nmap \u003cleader\u003ej :CtrlP\u003ccr\u003e\nmap \u003cC-b\u003e :CtrlPBuffer\u003ccr\u003e\n```\n\n[vim-snipmate](https://github.com/garbas/vim-snipmate) mappings to autocomplete via snippets:\n```vim\nino \u003cC-j\u003e \u003cC-r\u003e=snipMate#TriggerSnippet()\u003ccr\u003e\nsnor \u003cC-j\u003e \u003cesc\u003ei\u003cright\u003e\u003cC-r\u003e=snipMate#TriggerSnippet()\u003ccr\u003e\n```\n[vim-surround](https://github.com/tpope/vim-surround) mappings to easily surround a string with `_()` gettext annotation:\n```vim\nvmap Si S(i_\u003cesc\u003ef)\nau FileType mako vmap Si S\"i${ _(\u003cesc\u003e2f\"a) }\u003cesc\u003e\n```\n[ale](https://github.com/dense-analysis/ale) to easily go to the next Ale syntax/lint error:\n```vim\nnmap \u003csilent\u003e \u003cleader\u003ea \u003cPlug\u003e(ale_next_wrap)\n```\n[vim-indent-guides](https://github.com/nathanaelkane/vim-indent-guides) the default mapping to toggle the plugin is (`\u003cleader\u003eig`)\n\n    You can also use the following commands inside Vim:\n    :IndentGuidesEnable\n    :IndentGuidesDisable\n    :IndentGuidesToggle\n\n[vim-fugitive](https://github.com/tpope/vim-fugitive) to copy the link to the line of a Git repository to the clipboard:\n```vim\nnnoremap \u003cleader\u003ev :.GBrowse!\u003cCR\u003e\nxnoremap \u003cleader\u003ev :'\u003c'\u003eGBrowse!\u003cCR\u003e\n```\n### Spell checking\nPressing `\u003cleader\u003ess` will toggle spell checking:\n```vim\nmap \u003cleader\u003ess :setlocal spell!\u003ccr\u003e\n```\nShortcuts using `\u003cleader\u003e` instead of special characters:\n```vim\nmap \u003cleader\u003esn ]s\nmap \u003cleader\u003esp [s\nmap \u003cleader\u003esa zg\nmap \u003cleader\u003es? z=\n```\n### Running Code\nTo run code directly from vim, press `F5`. The currently open code will execute without you having to type anything.\n\nCan be used to execute code written in C, C++, Java, Python, Go, Octave, Bash scripts and HTML. To edit how you want your code to be executed, make changes in the file `~/.vim_runtime/vimrcs/extended.vim`\n\n### Cope\nQuery `:help cope` if you are unsure what cope is. It's super useful!\n\nWhen you search with `Ack.vim`, display your results in cope by doing:\n`\u003cleader\u003ecc`\n\nTo go to the next search result do:\n`\u003cleader\u003en`\n\nTo go to the previous search results do:\n`\u003cleader\u003ep`\n\nCope mappings:\n```vim\nmap \u003cleader\u003ecc :botright cope\u003ccr\u003e\nmap \u003cleader\u003eco ggVGy:tabnew\u003ccr\u003e:set syntax=qf\u003ccr\u003epgg\nmap \u003cleader\u003en :cn\u003ccr\u003e\nmap \u003cleader\u003ep :cp\u003ccr\u003e\n```\n\n## How to uninstall\nJust do following:\n* Remove `~/.vim_runtime`\n* Remove any lines that reference `.vim_runtime` in your `~/.vimrc`\n\n\n## Looking for a remote-first job?\n\nMaintaining this Vim configuration isn't my day job. Daily I am the founder/CEO of [Doist](https://doist.com/). You could come and help us build the workplace of the future while living a balanced life (anywhere in the world 🌍🌎🌏).\n\nPS: Using Vim isn't a requirement 😄\n\n","funding_links":[],"categories":["Vim script","Programming","Vim Script","A Little Background","VimL","others","编辑器","Credits","Bash","Mac OSX","Uncategorized","编程"],"sub_categories":["Code Editors","网络服务_其他","Uncategorized","命令行工具"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famix%2Fvimrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famix%2Fvimrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famix%2Fvimrc/lists"}