{"id":13496612,"url":"https://github.com/fsharp/zarchive-vim-fsharp","last_synced_at":"2025-10-04T19:31:36.795Z","repository":{"id":31939927,"uuid":"35509547","full_name":"fsharp/zarchive-vim-fsharp","owner":"fsharp","description":"F# bindings for vim","archived":true,"fork":false,"pushed_at":"2020-11-22T12:29:33.000Z","size":209,"stargazers_count":142,"open_issues_count":23,"forks_count":34,"subscribers_count":19,"default_branch":"master","last_synced_at":"2024-09-25T23:04:33.639Z","etag":null,"topics":["fsharp","vim"],"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/fsharp.png","metadata":{"files":{"readme":"README.mkd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-12T19:55:52.000Z","updated_at":"2024-07-01T06:08:57.000Z","dependencies_parsed_at":"2022-07-28T23:39:15.785Z","dependency_job_id":null,"html_url":"https://github.com/fsharp/zarchive-vim-fsharp","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/fsharp%2Fzarchive-vim-fsharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2Fzarchive-vim-fsharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2Fzarchive-vim-fsharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsharp%2Fzarchive-vim-fsharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fsharp","download_url":"https://codeload.github.com/fsharp/zarchive-vim-fsharp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219876757,"owners_count":16554786,"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":["fsharp","vim"],"created_at":"2024-07-31T19:01:52.942Z","updated_at":"2025-10-04T19:31:31.486Z","avatar_url":"https://github.com/fsharp.png","language":"Vim script","funding_links":[],"categories":["Vim script"],"sub_categories":[],"readme":"## F# support for Vim (vim-fsharp)\n\nSyntax and indent files have been copied from [fsharp-vim](http://github.com/kongo2002/fsharp-vim) with kind permissions from [kongo2002](https://github.com/kongo2002).\n\n\u003e Requires vim 7.3 or higher compiled with python 2 or 3 support.\n\nThis was adapted from http://github.com/timrobinson/fsharp-vim. The current aim is to provide a good experience for fsx scripting. On opening an fs or fsi file any project file found in the same directory will be parsed. Multiple projects are supported.\n\n### Installing\n\nvim-fsharp requires mono and fsharp installed.\n\n#### OSX and linux\n\n##### Installing with pathogen\n\n1. Install [pathogen][pathogen] and [syntastic][syntastic]\n\n2. Clone vim-fsharp into your bundle directory.\n\n2. Run *make* inside the vim directory. This downloads the auto completion server.\n\n##### Installing with [vim-plug][vim-plug]\n\n~~~.vim\nPlug 'fsharp/vim-fsharp', {\n      \\ 'for': 'fsharp',\n      \\ 'do':  'make fsautocomplete',\n      \\}\n~~~\n\n##### Installing with [NeoBundle][NeoBundle]\n\nBy VimL way:\n~~~.vim\nNeoBundle 'fsharp/vim-fsharp', {\n           \\ 'description': 'F# support for Vim',\n           \\ 'lazy': 1,\n           \\ 'autoload': {'filetypes': 'fsharp'},\n           \\ 'build': {\n           \\   'unix':  'make fsautocomplete',\n           \\ },\n           \\ 'build_commands': ['curl', 'make', 'mozroots', 'touch', 'unzip'],\n           \\}\n~~~\n\nBy using TOML configuration:\n~~~.toml\n[[plugins]]\ndescription = 'F# support for Vim'\nrepository = 'fsharp/vim-fsharp'\nlazy = 1\nfiletypes = 'fsharp'\nbuild_commands = ['curl', 'make', 'mozroots', 'touch', 'unzip']\n  [plugins.build]\n  unix = 'make fsautocomplete'\n~~~\n\n#### Windows\n\n1. Install [pathogen][pathogen] and [syntastic][syntastic]\n\n2. Run _install.cmd_\n\n#### Syntastic\n\nvim-fsharp utilizes the [syntastic][syntastic] plugin in order to\nsupply interactive syntax and type checking. You may want to install that plugin\nin order to get all of the fsharpbindings functionality.\n\nMoreover you benefit from additional [syntastic][syntastic] features like\noptional integration in your status bar (i.e. [vim-airline][airline]).\n\nAll you have to do is to install [syntastic][syntastic] in your vim runtime path.\n\n### Usage\n\nOpening either `*.fs`, `*.fsi` or `*.fsx` files should trigger syntax highlighting and other depending runtime files as well.\n\nOmnicomplete triggers the fsharp autocomplete process. (suggestion: install [supertab](https://github.com/ervandew/supertab))\n\n### Commands\n\n##### General\n* `:make` Calls xbuild on the fsproj for the current file (if any).\n* `:FSharpParseProject` Reparses all the project files and dependencies (this is done automatically when opening a .fs or .fsi file).\n* `:FSharpBuildProject` Calls xbuild on the fsproj for the current file (if any). Can also take a path to the proj file to build.\n* `:FSharpRunProject` Runs the project for the current file (if any).\n* `:FSharpRunTests` If `g:fsharp_test_runner` is set it will build the current project and run any tests. (Currently only tested with nunit-console.exe)\n* `:FSharpToggleHelptext` toggles g:fsharp_completion_helptext. (See below for details)\n* `leader\u003ct\u003e` Echoes the type of the expression currently pointed to by the cursor.\n* `leader\u003ch\u003e` Echoes the help info (type and comments) of the expression currently pointed to by the cursor.\n* `leader\u003cd\u003e` _go to declaration_ in current window.\n* `leader\u003cs\u003e` Takes you back from where _go to declaration_ was triggered. Experimental.\n\n##### FSharp Interactive\n* `:FsiEval` Evaluates an fsharp expression in the fsi\n* `leader\u003ce\u003e` Same as FsiEval but from a vim command line\n* `:FsiEvalBuffer` Evaluates the entire buffer in the fsi\n* `:FsiReset` Resets the current fsharp interactive\n* `:FsiRead` Outputs any lines written by the fsi but not yet output as vim messages\n* `:FsiClear` Deletes all text from the fsi output buffer but doesn't reset the fsi session.\n* `:FsiShow` Opens the _fsi-out_ buffer in a split window.\n* `Alt-Enter` Send either the current selection or the current line to the fsharp interactive and echoes the output the first line of the output. All output will be written to the _fsi-out_ buffer.\n* `leader\u003ci\u003e` Same as Alt-Enter\n\n### On-the-fly syntax checking\n\n\u003e Interactive syntax/type checking requires vim 7.4 or higher and [syntastic][syntastic]\n\nBy default your F# files will be syntax/type checked on every open/save of a vim buffer as well as after 500ms of inactivity in Normal mode.\nIn case you would prefer not to have you errors checked continuously add the following to your vimrc:\n\n~~~.vim\nlet g:fsharp_only_check_errors_on_write = 1\n~~~\n\nIn case you prefer to disable the syntax checker, add the following to your vimrc:\n\n~~~.vim\nlet g:syntastic_fsharp_checkers = ['']\n~~~\n\n### Settings\n\nYou can enable *debug-mode* in order to inspect the fsautocomplete behavior by\nsetting the global vim variable `g:fsharpbinding_debug` to a non-zero value:\n\n~~~.vim\nlet g:fsharpbinding_debug = 1\n~~~\n\nThis will create two log files `log.txt` and `log2.txt` in your temporary folder\n(i.e. `/tmp/`).\n\nOverride the default F# interactive binary\n\n~~~.vim\nlet g:fsharp_interactive_bin = '/path/to/fsi'\n~~~\n\nYou can set the msbuild/xbuild path.\n\n~~~.vim\nlet g:fsharp_xbuild_path = \"/path/to/xbuild/or/msbuild\"\n~~~\n\nThis setting needs to point to a suitable test runner (such as nunit-console.exe)\n\n~~~.vim\nlet g:fsharp_test_runner = \"/path/to/test/runner\"\n~~~\n\nThis enables the helptext to be displayed during auto completion. Turn off if completion is too slow.\n\n~~~.vim\nlet g:fsharp_completion_helptext = 1\n~~~\n\nShow comments, in addition to type signature, when using Omni completion (default=0).\n\n~~~.vim\nlet g:fsharp_helptext_comments = 1\n~~~\n\nIf you find the default bindings unsuitable then it is possible to turn them off.\n\n~~~.vim\nlet g:fsharp_map_keys = 0\n~~~\n\nIt is also possible to configure them to provide a more customised experience.\n\nOverride the default prefix of `\u003cleader\u003e` to the keys `cp`\n\n~~~.vim\nlet g:fsharp_map_prefix = 'cp'\n~~~\n\nOverride the default mapping to send the current like to fsharp interactive\n\n~~~.vim\nlet g:fsharp_map_fsisendline = 'p'\n~~~\n\nOverride the default mapping to send the current selection to fsharp interactive\n\n~~~.vim\nlet g:fsharp_map_fsisendsel = 'p'\n~~~\n\nOverride the default mapping to go to declaration in the current window\n\n~~~.vim\nlet g:fsharp_map_gotodecl = 'g'\n~~~\n\nOverride the default mapping to go back to where go to declaration was triggered\n\n~~~.vim\nlet g:fsharp_map_gobackfromdecl = 'b'\n~~~\n\nOverride the default mapping to evaluate an fsharp expression in the fsi\n\n~~~.vim\nlet g:fsharp_map_fsiinput = 'i'\n~~~\n\nAutomatically open the result of an FsiEval (fsi-out buffer) in a vsplit window\n\n~~~.vim\nlet g:fsharp_fsi_show_auto_open = 1\n~~~\n\n\n### Troubleshooting\n\n\u003e I get syntax highlighting but not error checking and commands like :FsiEval are not found\n\nType\n\n~~~.vim\n:SyntasticInfo\n~~~\n\nThe \"available\" and \"currently enabled\" checkers should be listed as \"syntax\".  If these entries are blank, then\nthe syntax checker has not been loaded properly.  One cause can be that your vim is compiled without Python support; type\n\n~~~\n:echo has('python')\n:echo has('python3')\n~~~\n\nto check this.\n\nIf both of this commands return 0 and you're on Debian 8, you may need to install the package 'vim-python-jedi' instead of 'vim' to have Python support. \n\n[syntastic]: https://github.com/scrooloose/syntastic\n[airline]: https://github.com/bling/vim-airline\n[pathogen]: https://github.com/tpope/vim-pathogen\n[vim-plug]: https://github.com/junegunn/vim-plug\n[NeoBundle]: https://github.com/Shougo/neobundle.vim\n\nNB: if you in the past installed `fsharpbinding-vim` you need to remove this from the `bundles` directory. They don't play nicely together and `fsharpbinding-vim` is no longer developed.\n\nMaintainers\n-----------\n\nTha maintainers of this repository appointed by the F# Core Engineering Group are:\n\n - [Robin Neatherway](https://github.com/rneatherway), [Steffen Forkmann](http://github.com/forki), [Karl Nilsson](http://github.com/kjnilsson), [Dave Thomas](http://github.com/7sharp9) and [Guillermo López-Anglada](http://github.com/guillermooo)\n - The primary maintainer for this repository is [Karl Nilsson](http://github.com/kjnilsson)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsharp%2Fzarchive-vim-fsharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffsharp%2Fzarchive-vim-fsharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsharp%2Fzarchive-vim-fsharp/lists"}