{"id":15711854,"url":"https://github.com/hrai/vim-files","last_synced_at":"2026-01-08T14:05:21.090Z","repository":{"id":51973139,"uuid":"64804899","full_name":"hrai/vim-files","owner":"hrai","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-05T03:26:39.000Z","size":8122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T20:06:28.987Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/hrai.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":"2016-08-03T01:32:17.000Z","updated_at":"2022-09-01T05:32:18.000Z","dependencies_parsed_at":"2023-10-05T07:26:16.844Z","dependency_job_id":"8ac44ee9-eb2e-4de8-bc3f-0cb9b1b667c6","html_url":"https://github.com/hrai/vim-files","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/hrai%2Fvim-files","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrai%2Fvim-files/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrai%2Fvim-files/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrai%2Fvim-files/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrai","download_url":"https://codeload.github.com/hrai/vim-files/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246358251,"owners_count":20764366,"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-10-03T21:14:06.461Z","updated_at":"2026-01-08T14:05:21.024Z","avatar_url":"https://github.com/hrai.png","language":"Vim Script","funding_links":[],"categories":[],"sub_categories":[],"readme":"Forked from https://github.com/amix/vimrc\n\nIf you have a pre-existing .vim_runtime folder, just run ~/.vim_runtime/refresh_and_install_vimrcs.sh to remove the whole folder and get everything from github.\n\n## How to install the Awesome version?\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\nFor HTTPS:\n\n\trm -rf ~/.vim_runtime\n\tgit clone https://github.com/hrai/vim-files.git ~/.vim_runtime\n\tsh ~/.vim_runtime/install_awesome_vimrc.sh\n\nFor SSH:\n\n\trm -rf ~/.vim_runtime\n\tgit clone git@github.com:hrai/vim-files.git ~/.vim_runtime\n\tsh ~/.vim_runtime/install_awesome_vimrc.sh\n\nI also recommend using [the Hack font](http://sourcefoundry.org/hack/) (it's a free and awesome font designed for source code). The Awesome vimrc is already setup to try to use it.\n\n## How to install the Basic version?\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 https://github.com/hrai/vim-files.git ~/.vim_runtime\n\tsh ~/.vim_runtime/install_basic_vimrc.sh\n\n\n## How to install on Windows?\n\nUse [msysgit](http://msysgit.github.com/) 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## How to update to latest version?\n\nJust do a git rebase!\n\n    cd ~/.vim_runtime\n    git pull --rebase\n\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\nOpening recently opened files with the [mru.vim](https://github.com/vim-scripts/mru.vim) plugin:\n\n![Screenshot 2](https://dnp4pehkvoo6n.cloudfront.net/1d49a88f9bd5d013c025bb1e1272a7d8/as/MRU%20plugin.png)\n\n[NERD Tree](https://github.com/scrooloose/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/scrooloose/nerdtree): A tree explorer plugin for vim\n* [mru.vim](https://github.com/vim-scripts/mru.vim): Plugin to manage Most Recently Used (MRU) files. This plugin can be opened with `\u003cleader+f\u003e`\n* [open_file_under_cursor.vim](https://github.com/amix/open_file_under_cursor.vim): Open file under cursor when pressing `gf`\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\nRemove all clutter and focus only on the essential. Similar to iA Writer or Write Room [Read more here](http://amix.dk/blog/post/19744)\n\n\n## Included color schemes\n\n* [vim-colors-solarized](https://github.com/altercation/vim-colors-solarized)\n\n## Included modes\n\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/tpope/vim-markdown)\n* [nginx.vim](https://github.com/vim-scripts/nginx.vim): Highlights configuration files for nginx\n* [vim-go](https://github.com/fatih/vim-go)\n\n\n## How to include your own stuff?\n\nAfter you have installed the setup, you can create **~/.vim_runtime/my_configs.vim** to fill in any configurations that are important for you. For instance, my **my_configs.vim** looks like this:\n\n\t~/.vim_runtime (master)\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 Vundle\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### Plugin related mappings\n\nOpen [bufexplorer](https://github.com/vim-scripts/bufexplorer.zip) to see and manage the current buffers (`\u003cleader\u003eo`):\n\n    map \u003cleader\u003eo :BufExplorer\u003ccr\u003e\n\nOpen [MRU.vim](https://github.com/vim-scripts/mru.vim) to see the recently open files (`\u003cleader\u003ef`):\n\n    map \u003cleader\u003ef :MRU\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\n    let g:ctrlp_map = '\u003cc-f\u003e'\n\n[NERD Tree](https://github.com/scrooloose/nerdtree) mappings:\n\n    map \u003cleader\u003enn :NERDTreeToggle\u003ccr\u003e\n    map \u003cleader\u003enb :NERDTreeFromBookmark\n    map \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\n    map \u003cleader\u003ez :Goyo\u003ccr\u003e\n\n\n### Normal mode mappings\n\nFast saving of a buffer (`\u003cleader\u003ew`):\n\n\tnmap \u003cleader\u003ew :w!\u003ccr\u003e\n\nMap `\u003cSpace\u003e` to `/` (search) and `\u003cCtrl\u003e+\u003cSpace\u003e` to `?` (backwards search):\n\n\tmap \u003cspace\u003e /\n\tmap \u003cc-space\u003e ?\n\tmap \u003csilent\u003e \u003cleader\u003e\u003ccr\u003e :noh\u003ccr\u003e\n\nDisable highlights when you press `\u003cleader\u003e\u003ccr\u003e`:\n\n\tmap \u003csilent\u003e \u003cleader\u003e\u003ccr\u003e :noh\u003ccr\u003e\n\nSmart way to move between windows (`\u003cctrl\u003ej` etc.):\n\n\tmap \u003cC-j\u003e \u003cC-W\u003ej\n\tmap \u003cC-k\u003e \u003cC-W\u003ek\n\tmap \u003cC-h\u003e \u003cC-W\u003eh\n\tmap \u003cC-l\u003e \u003cC-W\u003el\n\nClosing of the current buffer(s) (`\u003cleader\u003ebd` and (`\u003cleader\u003eba`)):\n\n\t\" Close current buffer\n\tmap \u003cleader\u003ebd :Bclose\u003ccr\u003e\n\n\t\" Close all buffers\n\tmap \u003cleader\u003eba :1,1000 bd!\u003ccr\u003e\n\nUseful mappings for managing tabs:\n\n\tmap \u003cleader\u003etn :tabnew\u003ccr\u003e\n\tmap \u003cleader\u003eto :tabonly\u003ccr\u003e\n\tmap \u003cleader\u003etc :tabclose\u003ccr\u003e\n\tmap \u003cleader\u003etm :tabmove\n\n\t\" Opens a new tab with the current buffer's path\n\t\" Super useful when editing files in the same directory\n\tmap \u003cleader\u003ete :tabedit \u003cc-r\u003e=expand(\"%:p:h\")\u003ccr\u003e/\n\nSwitch [CWD](http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file) to the directory of the open buffer:\n\n\tmap \u003cleader\u003ecd :cd %:p:h\u003ccr\u003e:pwd\u003ccr\u003e\n\nOpen `ack.vim` for fast search:\n\n\tmap \u003cleader\u003eg :Ack\n\nQuickly open a buffer for scripbble:\n\n\tmap \u003cleader\u003eq :e ~/buffer\u003ccr\u003e\n\nToggle paste mode on and off:\n\n\tmap \u003cleader\u003epp :setlocal paste!\u003ccr\u003e\n\n\n### Visual mode mappings\n\nVisual mode pressing `*` or `#` searches for the current selection:\n\n\tvnoremap \u003csilent\u003e * :call VisualSelection('f')\u003cCR\u003e\n\tvnoremap \u003csilent\u003e # :call VisualSelection('b')\u003cCR\u003e\n\nWhen you press gv you `Ack.vim` after the selected text:\n\n\tvnoremap \u003csilent\u003e gv :call VisualSelection('gv', '')\u003cCR\u003e\n\nWhen you press `\u003cleader\u003er` you can search and replace the selected text:\n\n\tvnoremap \u003csilent\u003e \u003cleader\u003er :call VisualSelection('replace')\u003cCR\u003e\n\nSurround the visual selection in parenthesis/brackets/etc.:\n\n    vnoremap $1 \u003cesc\u003e`\u003ea)\u003cesc\u003e`\u003ci(\u003cesc\u003e\n    vnoremap $2 \u003cesc\u003e`\u003ea]\u003cesc\u003e`\u003ci[\u003cesc\u003e\n    vnoremap $3 \u003cesc\u003e`\u003ea}\u003cesc\u003e`\u003ci{\u003cesc\u003e\n    vnoremap $$ \u003cesc\u003e`\u003ea\"\u003cesc\u003e`\u003ci\"\u003cesc\u003e\n    vnoremap $q \u003cesc\u003e`\u003ea'\u003cesc\u003e`\u003ci'\u003cesc\u003e\n    vnoremap $e \u003cesc\u003e`\u003ea\"\u003cesc\u003e`\u003ci\"\u003cesc\u003e\n\n\n### Insert mode mappings\n\nQuickly insert parenthesis/brackets/etc.:\n\n    inoremap $1 ()\u003cesc\u003ei\n    inoremap $2 []\u003cesc\u003ei\n    inoremap $3 {}\u003cesc\u003ei\n    inoremap $4 {\u003cesc\u003eo}\u003cesc\u003eO\n    inoremap $q ''\u003cesc\u003ei\n    inoremap $e \"\"\u003cesc\u003ei\n    inoremap $t \u003c\u003e\u003cesc\u003ei\n\nInsert the current date and time (useful for timestamps):\n\n    iab 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\n    cno $q \u003cC-\\\u003eeDeleteTillSlash()\u003ccr\u003e\n\nBash like keys for the command line:\n\n    cnoremap \u003cC-A\u003e\t\t\u003cHome\u003e\n    cnoremap \u003cC-E\u003e\t\t\u003cEnd\u003e\n    cnoremap \u003cC-K\u003e\t\t\u003cC-U\u003e\n\n    cnoremap \u003cC-P\u003e \u003cUp\u003e\n    cnoremap \u003cC-N\u003e \u003cDown\u003e\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\n### Spell checking\nPressing `\u003cleader\u003ess` will toggle spell checking:\n\n    map \u003cleader\u003ess :setlocal spell!\u003ccr\u003e\n\nShortcuts using `\u003cleader\u003e` instead of special characters:\n\n    map \u003cleader\u003esn ]s\n    map \u003cleader\u003esp [s\n    map \u003cleader\u003esa zg\n    map \u003cleader\u003es? z=\n\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\n    map \u003cleader\u003ecc :botright cope\u003ccr\u003e\n    map \u003cleader\u003eco ggVGy:tabnew\u003ccr\u003e:set syntax=qf\u003ccr\u003epgg\n    map \u003cleader\u003en :cn\u003ccr\u003e\n    map \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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrai%2Fvim-files","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrai%2Fvim-files","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrai%2Fvim-files/lists"}