{"id":15480202,"url":"https://github.com/andycall/vimrc","last_synced_at":"2026-01-07T10:04:39.439Z","repository":{"id":22385708,"uuid":"25722480","full_name":"andycall/vimrc","owner":"andycall","description":"My personal Vim editor configuration file","archived":false,"fork":false,"pushed_at":"2014-10-25T11:24:38.000Z","size":4320,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T04:30:51.351Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"VimL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"GoneUp/Tera_PacketViewer","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andycall.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-10-25T06:28:38.000Z","updated_at":"2014-11-21T13:28:09.000Z","dependencies_parsed_at":"2022-08-21T03:31:11.944Z","dependency_job_id":null,"html_url":"https://github.com/andycall/vimrc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andycall/vimrc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andycall%2Fvimrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andycall%2Fvimrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andycall%2Fvimrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andycall%2Fvimrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andycall","download_url":"https://codeload.github.com/andycall/vimrc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andycall%2Fvimrc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28234569,"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","status":"online","status_checked_at":"2026-01-07T02:00:05.975Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-10-02T04:41:09.052Z","updated_at":"2026-01-07T10:04:39.423Z","avatar_url":"https://github.com/andycall.png","language":"VimL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# The Ultimate vimrc\n\nOver the last 8 years I have used and tweaked Vim. This is my Ultimate vimrc.\n\nThere are two versions:\n\n* **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 great basic setup\n* **Awesome**: This 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 Basic version?\nThe basic version is basically just one file and no plugins. You can check out [basic.vim](https://github.com/amix/vimrc/blob/master/vimrcs/basic.vim).\n\nThis 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 git://github.com/amix/vimrc.git ~/.vim_runtime\n\tsh ~/.vim_runtime/install_basic_vimrc.sh\n\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:\n\n\tgit clone git://github.com/amix/vimrc.git ~/.vim_runtime\n\tsh ~/.vim_runtime/install_awesome_vimrc.sh\n\nI also recommend using [Source Code Pro font from Adobe](http://store1.adobe.com/cfusion/store/html/index.cfm?event=displayFontPackage\u0026code=1960) (it's free and awesome font for writing and programming). The Awesome vimrc is already setup to try to use it\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 update to latest version?\n\nSimply just 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![Screenshot 1](http://files1.wedoist.com/e952fdb343b1e617b90d256e474d0370/as/screenshot_1.png)\n\nOpening recently opened files [mru.vim](https://github.com/vim-scripts/mru.vim):\n![Screenshot 2](http://files1.wedoist.com/1967b0e48af40e513d1a464e08196990/as/screenshot_2.png)\n\n[NERD Tree](https://github.com/scrooloose/nerdtree) plugin in a terminal window:\n![Screenshot 3](http://files1.wedoist.com/b1509d7ed9e9f357e8d04797f9fad67b/as/screenshot3.png)\n\nThis vimrc even works on Windows!\n![Screenshot 4](http://files1.wedoist.com/4e85163d97b81422240c822c82022f2f/as/screenshot_4.png)\n\nDistraction free mode (using goyo.vim and vim-zenroom2):\n![Screenshot 5](https://d2dq6e731uoz0t.cloudfront.net/a5182977c3d6c2a6cd3f9e97398ca8ca/as/zen_mode.jpg)\n\n\n## Included Plugins\n\nI recommend reading the docs of these plugins to understand them better. Each of them provide a much better Vim experience!\n\n* [pathogen.vim](https://github.com/tpope/vim-pathogen): Manages the runtime path of the plugins\n* [YankRing](https://github.com/vim-scripts/YankRing.vim): Maintains a history of previous yanks, changes and deletes\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* [bufexplorer.zip](https://github.com/vim-scripts/bufexplorer.zip): Buffer Explorer / Browser. This plugin can be opened with `\u003cleader+o\u003e`\n* [NERD Tree](https://github.com/scrooloose/nerdtree): A tree explorer plugin for vim\n* [ack.vim](https://github.com/mileszs/ack.vim): Vim plugin for the Perl module / CLI script 'ack'\n* [ctrlp.vim](https://github.com/kien/ctrlp.vim): Fuzzy file, buffer, mru and tag finder. In my config it's mapped to `\u003cCtrl+F\u003e`, because `\u003cCtrl+P\u003e` is used by YankRing\n* [mru.vim](https://github.com/vim-scripts/mru.vim): Plugin to manage Most Recently Used (MRU) files. Includes my own fork which adds syntax highlighting to MRU. 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* [zencoding](https://github.com/mattn/emmet-vim): Expanding abbreviation like zen-coding, very useful for editing XML, HTML.\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* [taglist.vim](https://github.com/vim-scripts/taglist.vim): Source code browser (supports C/C++, java, perl, python, tcl, sql, php, etc)\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-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-airline](https://github.com/bling/vim-airline): Lean \u0026 mean status/tabline for vim that's light as air (replacing powerline)\n* [vim-fugitive](https://github.com/tpope/vim-fugitive): A Git wrapper so awesome, it should be illegal\n* [goyo.vim](https://github.com/junegunn/goyo.vim) and [vim-zenroom2](https://github.com/amix/vim-zenroom2): \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* [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* [syntastic](https://github.com/scrooloose/syntastic): Syntax checking hacks for vim\n\n\n## Included color schemes\n\n* [peaksea](https://github.com/vim-scripts/peaksea): My favorite!\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/tpope/vim-markdown)\n* [nginx.vim](https://github.com/vim-scripts/nginx.vim): Highlights configuration files for nginx\n* [vim-golang](https://github.com/jnwhiteh/vim-golang)\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 own plugins, for instance, via pathogen we 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 sources_non_forked/vim-rails\n\t\nNow you have vim-rails installed ;-)\n\n\n## Key Mappings\n\n### Plugin related mappings\n\nOpen [bufexplorer](https://github.com/vim-scripts/bufexplorer.zip) and see and manage the current buffers:\n    \n    map \u003cleader\u003eo :BufExplorer\u003ccr\u003e\n\nOpen [MRU.vim](https://github.com/vim-scripts/mru.vim) and see the recently open files:\n\n    map \u003cleader\u003ef :MRU\u003cCR\u003e\n\nOpen [ctrlp.vim](https://github.com/kien/ctrlp.vim) plugin:\n    \n    let g:ctrlp_map = '\u003cc-f\u003e'\n\nOpen [PeepOpen](https://peepcode.com/products/peepopen) plugin:\n\n    map \u003cleader\u003ej :PeepOpen\u003ccr\u003e\n\nManaging the [NERD Tree](https://github.com/scrooloose/nerdtree) plugin:\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.\n\n    map \u003cleader\u003ez :Goyo\u003ccr\u003e\n\n### Normal mode mappings\n\nFast saving of a buffer:\n\n\tnmap \u003cleader\u003ew :w!\u003ccr\u003e\n\nTreat long lines as break lines (useful when moving around in them):\n\n\tmap j gj\n\tmap k gk\n\t\nMap `\u003cSpace\u003e` to `/` (search) and `\u003cCtrl\u003e+\u003cSpace\u003e` to `?` (backwards search):\n\t\n\tmap \u003cspace\u003e /\n\tmap \u003cc-space\u003e ?\n\tmap \u003csilent\u003e \u003cleader\u003e\u003ccr\u003e :noh\u003ccr\u003e\n\nDisable highlight when `\u003cleader\u003e\u003ccr\u003e` is pressed:\n\t\n\tmap \u003csilent\u003e \u003cleader\u003e\u003ccr\u003e :noh\u003ccr\u003e\n\nSmart way to move between windows:\n\t\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 current buffer(s):\n\t\n\t\" Close current buffer\n\tmap \u003cleader\u003ebd :Bclose\u003ccr\u003e\n\t\n\t\" Close all buffers\n\tmap \u003cleader\u003eba :1,1000 bd!\u003ccr\u003e\n\t\nUseful mappings for managing tabs:\n\t\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\t\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\t\nSwitch CWD to the directory of the open buffer:\n\t\n\tmap \u003cleader\u003ecd :cd %:p:h\u003ccr\u003e:pwd\u003ccr\u003e\n\t\nOpen vimgrep and put the cursor in the right position:\n\t\n\tmap \u003cleader\u003eg :vimgrep // **/*.\u003cleft\u003e\u003cleft\u003e\u003cleft\u003e\u003cleft\u003e\u003cleft\u003e\u003cleft\u003e\u003cleft\u003e\n\nVimgreps in the current file:\n\t\n\tmap \u003cleader\u003e\u003cspace\u003e :vimgrep // \u003cC-R\u003e%\u003cC-A\u003e\u003cright\u003e\u003cright\u003e\u003cright\u003e\u003cright\u003e\u003cright\u003e\u003cright\u003e\u003cright\u003e\u003cright\u003e\u003cright\u003e\n\nRemove the Windows ^M - when the encodings gets messed up:\n\t\n\tnoremap \u003cleader\u003em mmHmt:%s/\u003cC-V\u003e\u003ccr\u003e//ge\u003ccr\u003e'tzt'm\n\t\nQuickly open a buffer for scripbble:\n\t\n\tmap \u003cleader\u003eq :e ~/buffer\u003ccr\u003e\n\nToggle paste mode on and off:\n\t\n\tmap \u003cleader\u003epp :setlocal paste!\u003ccr\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### 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 vimgrep 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\t\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 (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 and untoggle spell checking\n\n    map \u003cleader\u003ess :setlocal spell!\u003ccr\u003e\n\nShortcuts using `\u003cleader\u003e` instead of special chars\n\n    map \u003cleader\u003esn ]s\n    map \u003cleader\u003esp [s\n    map \u003cleader\u003esa zg\n    map \u003cleader\u003es? z=\n\n### Cope\t\nDo :help cope if you are unsure what cope is. It's super useful!\n\nWhen you search with vimgrep, 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\nVimscript 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## Useful blog tips regarding my Vim setup\n\n* [Vim: Annotate strings with gettext (the macro way)](http://amix.dk/blog/post/19678#Vim-Annotate-strings-with-gettext-the-macro-way)\n* [vimgrep: Searching through multiple file extensions](http://amix.dk/blog/post/19672#vimgrep-Searching-through-multiple-file-extensions)\n* [Filtering through vimgrep results using regular expressions](http://amix.dk/blog/post/19666#Filtering-through-vimgrep-results-using-regular-expressions)\n* [PeepOpen - File auto completion for Mac editors](http://amix.dk/blog/post/19601#PeepOpen-File-auto-completion-for-Mac-editors)\n* [Vim 7.3: Persistent undo and encryption!](http://amix.dk/blog/post/19548#Vim-7-3-Persistent-undo-and-encryption)\n* [Vim tips: Visual Search](http://amix.dk/blog/post/19334#Vim-tips-Visual-Search)\n* [Folding in Vim](http://amix.dk/blog/post/19132#Folding-in-Vim)\n* [\nZen room for Vim: Focusing only on the essential](http://amix.dk/blog/post/19744#zenroom-for-Vim-Focsuing-only-on-the-essential)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandycall%2Fvimrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandycall%2Fvimrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandycall%2Fvimrc/lists"}