{"id":13682867,"url":"https://github.com/begriffs/haskell-vim-now","last_synced_at":"2025-04-12T14:20:01.648Z","repository":{"id":12407671,"uuid":"15061309","full_name":"begriffs/haskell-vim-now","owner":"begriffs","description":"One-line Haskell Vim install","archived":false,"fork":false,"pushed_at":"2020-08-25T14:20:41.000Z","size":374,"stargazers_count":989,"open_issues_count":39,"forks_count":100,"subscribers_count":27,"default_branch":"master","last_synced_at":"2025-04-12T14:19:53.809Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/begriffs.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}},"created_at":"2013-12-09T22:50:29.000Z","updated_at":"2025-03-23T13:09:22.000Z","dependencies_parsed_at":"2022-09-23T06:24:45.643Z","dependency_job_id":null,"html_url":"https://github.com/begriffs/haskell-vim-now","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/begriffs%2Fhaskell-vim-now","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fhaskell-vim-now/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fhaskell-vim-now/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/begriffs%2Fhaskell-vim-now/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/begriffs","download_url":"https://codeload.github.com/begriffs/haskell-vim-now/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578875,"owners_count":21127714,"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-08-02T13:01:54.633Z","updated_at":"2025-04-12T14:20:01.616Z","avatar_url":"https://github.com/begriffs.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/begriffs/haskell-vim-now.svg?branch=master)](https://travis-ci.org/begriffs/haskell-vim-now)\n\u003cimg src=\"img/haskell.png\" align=\"right\" /\u003e\n\u003cimg src=\"img/vim.png\" align=\"right\" /\u003e\n\n\u003ch2 align=\"left\"\u003eHaskell Vim IDE\u003c/h2\u003e\n\n\u003cbr /\u003e\n\nIn less than **ten minutes** your Vim will transform into a beautiful\nHaskell paradise.  (Don't worry, it backs up your original\nconfiguration to `~/.config/haskell-vim-now/backup/.vimrc.yearmonthdate_time`.) It also builds all necessary support binaries\nincluding `ghcide`, `hlint`, `hoogle` and more.\n\nNo more wading through plugins trying to make them all work together.\nIn ten minutes you will have a fully functional Vim that looks great\nand lets you\n\n* inspect types\n* evaluate Haskell\n* lint and check\n* manipulate tags\n* hoogle lookup\n* pointfree refactor\n* tab complete\n* unicode symbols\n* highlight DSLs\n* work with git\n\n\n## Installation\n\nJust download and run the installer:\n\n```sh\ncurl -L https://git.io/haskell-vim-now \u003e /tmp/haskell-vim-now.sh\nbash /tmp/haskell-vim-now.sh\n```\n**WARNING**: this command, once successful, will _make backups and **remove**_ your existing VIM configurations (`.vim`, plugins etc). You can later [customize](#customizing) HVN configurations.\n\n## Keybindings and commands\n\nThe commands are organized into logical groups to help you remember\nthem.\n\n### Types, autocomplete, refactoring, and linting\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u0026lt;Tab\u0026gt;\u003c/td\u003e\u003ctd\u003eAutocomplete with words in file\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u0026lt;C-space\u0026gt;\u003c/td\u003e\u003ctd\u003eAutocomplete with symbols in your Cabal sandbox\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,hr\u003c/td\u003e\u003ctd\u003eApply one refactoring hint at cursor position\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,hR\u003c/td\u003e\u003ctd\u003eApply all refactoring suggestions in the file\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,hl\u003c/td\u003e\u003ctd\u003eRun Haskell linter on file\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,hc\u003c/td\u003e\u003ctd\u003eRun Haskell compile check on file\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,\u0026lt;cr\u0026gt;\u003c/td\u003e\u003ctd\u003eClear type selection\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Hoogle\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,hh\u003c/td\u003e\u003ctd\u003eRun Hoogle on the word under the cursor\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,hH\u003c/td\u003e\u003ctd\u003eRun Hoogle and prompt for input\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,hi\u003c/td\u003e\u003ctd\u003eRun Hoogle for detailed information on word under cursor\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,hI\u003c/td\u003e\u003ctd\u003eRun Hoogle for detailed information and prompt for input\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,hz\u003c/td\u003e\u003ctd\u003eClose the Hoogle search window\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### GHCI repl\n\nIf you open a tmux terminal alongside MacVim then you can send Vim\nselections to it. This works well for evaluating things in GHCI.\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,rs\u003c/td\u003e\u003ctd\u003eSend selected text to tmux\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,rv\u003c/td\u003e\u003ctd\u003eChange tmux session, window, and pane attachment\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Git\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,g?\u003c/td\u003e\u003ctd\u003eLast-committed files (Monday morning key)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,gs\u003c/td\u003e\u003ctd\u003eGit status (fugitive)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,gg\u003c/td\u003e\u003ctd\u003eGit grep\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,gl\u003c/td\u003e\u003ctd\u003eGit log (extradition)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,gd\u003c/td\u003e\u003ctd\u003eGit diff\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,gb\u003c/td\u003e\u003ctd\u003eGit blame\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Commenting\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003egc\u003c/td\u003e\u003ctd\u003eComment / Uncomment selection\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Aligning\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,a=\u003c/td\u003e\u003ctd\u003eAlign on equal signs\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,a,\u003c/td\u003e\u003ctd\u003eAlign on commas\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,a|\u003c/td\u003e\u003ctd\u003eAlign on vertical bar\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,ap\u003c/td\u003e\u003ctd\u003eAlign on character of your choice\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Splits and find file\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,\u0026lt;space\u0026gt;\u003c/td\u003e\u003ctd\u003eFuzzy file find (CtrlP)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,f\u003c/td\u003e\u003ctd\u003eToggle file browser, find file\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,F\u003c/td\u003e\u003ctd\u003eToggle file browser\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,sj\u003c/td\u003e\u003ctd\u003eOpen split below\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,sk\u003c/td\u003e\u003ctd\u003eOpen split above\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,sh\u003c/td\u003e\u003ctd\u003eOpen split leftward\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,sl\u003c/td\u003e\u003ctd\u003eOpen split rightward\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Buffers\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,bp\u003c/td\u003e\u003ctd\u003ePrevious buffer\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,bn\u003c/td\u003e\u003ctd\u003eNext buffer\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,b\u0026lt;space\u0026gt;\u003c/td\u003e\u003ctd\u003eBuffer fuzzy finder\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,bd\u003c/td\u003e\u003ctd\u003eDelete buffer, keep window open (bbye)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,bo\u003c/td\u003e\u003ctd\u003eClose all buffers except the current one\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n### Misc\n\n\u003ctable\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,ma\u003c/td\u003e\u003ctd\u003eEnable mouse mode (default)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,mo\u003c/td\u003e\u003ctd\u003eDisable mouse mode\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,ig\u003c/td\u003e\u003ctd\u003eToggle indentation guides\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,u\u003c/td\u003e\u003ctd\u003eInteractive undo tree\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,ss\u003c/td\u003e\u003ctd\u003eEnable spell checking\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,e\u003c/td\u003e\u003ctd\u003eOpen file prompt with current path\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,\u0026lt;cr\u0026gt;\u003c/td\u003e\u003ctd\u003eClear search highlights\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,r\u003c/td\u003e\u003ctd\u003eRedraw screen\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-h\u003c/td\u003e\u003ctd\u003eMove cursor to leftward pane\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-k\u003c/td\u003e\u003ctd\u003eMove cursor to upward pane\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-j\u003c/td\u003e\u003ctd\u003eMove cursor to downward pane\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eC-l\u003c/td\u003e\u003ctd\u003eMove cursor to rightward pane (redraw is `,r` instead)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003egq\u003c/td\u003e\u003ctd\u003eFormat selection using `hindent` for haskell buffers (`par` for others)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,y\u003c/td\u003e\u003ctd\u003eYank to OS clipboard\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,d\u003c/td\u003e\u003ctd\u003eDelete to OS clipboard\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e,p\u003c/td\u003e\u003ctd\u003ePaste from OS clipboard\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n(If you prefer to restore the default screen redraw action of `C-l`\nthen add `unmap \u003cc-l\u003e` to your vimrc.local)\n\n## Customizing\n\nAfter installing this configuration, your `.vimrc` and `.vim` will\nbe under version control. Don't alter these files. Instead, add\nyour own settings to `~/.config/haskell-vim-now/vimrc.local.pre`,\n`~/.config/haskell-vim-now/vimrc.local`.\n\n## Adding Vim Plugins\n\nHaskell-Vim-Now uses [vim-plug](https://github.com/junegunn/vim-plug)\nto install plugins. It uses the following vim configuration structure\nto determine what to install:\n\n```viml\ncall plug#begin('~/.vim/plugged')\n\n\" The plugins are named in github short form, for example:\nPlug 'junegunn/vim-easy-align'\n\n\" All plug statements must be between plug#begin and plug#end\ncall plug#end()\n```\n\nHowever the `.vimrc` file in Haskell-Vim-Now is under version control\nso you shouldn't edit it directly. To add a plugin what you should\ndo is add `Plug` statements to `~/.config/haskell-vim-now/plugins.vim`.\nWhen ready reload `.vimrc` and run `:PlugInstall` to install plugins.\n\n## Neovim support\n\nThe `.vimrc` configuration is fully compatible with Neovim, and adds a few\nNeovim specific mappings for the terminal mode (terminal emulation is activated\nwith `:terminal`). The mappings make `Esc` and `c-[hjkl]` function as one would\nexpect them to from normal mode.\n\nThe Neovim configuration is found at `.config/nvim`, and is symlinked just like\nregular vim, which means you should only add your own settings to\n`~/.config/haskell-vim-now/vimrc.local.pre`, `~/.config/haskell-vim-now/vimrc.local`\nand `~/.config/haskell-vim-now/plugins.vim`.\n\nYou can quickly backup and replace your Neovim setup by running the `scripts/neovim.sh`\nscript.\n\n## Docker image\n\nIf you are into developing with Docker, you can use the image.\n\n    docker pull haskell:7.8\n    docker build -t haskell-vim .\n    docker run --rm -i -t haskell-vim /bin/bash\n\nIf instead you want to extract the vim setup from the image that is easy enough\n\n    docker build -t haskell-vim .\n    mkdir ~/.haskell-vim-now\n    cd ~/.haskell-vim-now\n    docker run --rm haskell-vim tar -cz -C /root/.haskell-vim-now . \u003e haskell-vim-now.tgz\n    tar -xzf haskell-vim-now.tgz\n\nHowever, some things (for example the hoogle database) use absolute paths and don't work correctly.\n\n## Advanced install methods\n\n### Basic install\nIn case you want to skip the haskell specific components and want to install\njust the common vim config you can use:\n```sh\nbash \u003c(curl -sL https://git.io/haskell-vim-now) --basic\n```\n\n### Installing from a fork or clone\nIf you have a modified fork you can use the `--repo` option to tell the install\nscript the location of your repository:\n```sh\nbash \u003c(curl -sL INSTALL-SCRIPT-URL) --repo FORK-URL\n```\n\nFor example:\n\n```sh\nbash \u003c(curl -sL https://raw.githubusercontent.com/begriffs/haskell-vim-now/master/install.sh) --repo https://github.com/begriffs/haskell-vim-now.git\n```\n\nAdditionally the `--branch` argument can override the default of `master` used when cloning the repo.\n\nIf you have a local git clone you can use `install.sh` directly\nto install from your clone:\n```sh\ninstall.sh --repo CLONE-PATH\n```\n\n### Installing in Nix build environment\n\nUse `--nix` parameter, in case you want to execute [stack installation in nix-shell](https://docs.haskellstack.org/en/stable/nix_integration/#use-stack-as-normal)\n```sh\nbash \u003c(curl -sL https://git.io/haskell-vim-now) --nix\n```\n\n## Troubleshooting\n\nSee this [wiki](https://github.com/begriffs/haskell-vim-now/wiki/Installation-Troubleshooting)\npage for tips on fixing installation problems.\n\n## Thank you!\n\nBig thanks to [contributors](https://github.com/begriffs/haskell-vim-now/graphs/contributors). I'd especially like to thank [@SX91](https://github.com/SX91) for rewriting the installer and for other major improvements.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbegriffs%2Fhaskell-vim-now","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbegriffs%2Fhaskell-vim-now","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbegriffs%2Fhaskell-vim-now/lists"}