Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
filipelbc committed Feb 8, 2017
1 parent 8a7e371 commit c4a29d5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 19 deletions.
30 changes: 14 additions & 16 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

Syntax and indent files have been copied from [fsharp-vim](http://github.com/kongo2002/fsharp-vim) with kind permissions from [kongo2002](https://github.com/kongo2002).

> Requires vim 7.3 or higher compiled with python 2 support.
> Requires vim 7.3 or higher compiled with python 2 or 3 support.
This 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.

###Installing

vim-fsharp requires mono and fsharp installed.
vim-fsharp requires mono and fsharp installed.

####OSX and linux

Expand Down Expand Up @@ -85,29 +85,29 @@ Omnicomplete triggers the fsharp autocomplete process. (suggestion: install [sup
* `:make` Calls xbuild on the fsproj for the current file (if any).
* `:FSharpParseProject` Reparses all the project files and dependencies (this is done automatically when opening a .fs or .fsi file).
* `:FSharpBuildProject` Calls xbuild on the fsproj for the current file (if any). Can also take a path to the proj file to build.
* `:FSharpRunProject` Runs the project for the current file (if any).
* `:FSharpRunProject` Runs the project for the current file (if any).
* `: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)
* `:FSharpToggleHelptext` toggles g:fsharp_completion_helptext. (See below for details)
* `:FSharpToggleHelptext` toggles g:fsharp_completion_helptext. (See below for details)
* `leader<t>` Echoes the type of the expression currently pointed to by the cursor.
* `leader<d>` _go to declaration_ in current window.
* `leader<d>` _go to declaration_ in current window.
* `leader<s>` Takes you back from where _go to declaration_ was triggered. Experimental.

#####FSharp Interactive
* `:FsiEval` Evaluates an fsharp expression in the fsi
* `leader<e>` Same as FsiEval but from a vim command line
* `:FsiEvalBuffer` Evaluates the entire buffer in the fsi
* `:FsiEval` Evaluates an fsharp expression in the fsi
* `leader<e>` Same as FsiEval but from a vim command line
* `:FsiEvalBuffer` Evaluates the entire buffer in the fsi
* `:FsiReset` Resets the current fsharp interactive
* `:FsiRead` Outputs any lines written by the fsi but not yet output as vim messages
* `:FsiClear` Deletes all text from the fsi output buffer but doesn't reset the fsi session.
* `:FsiShow` Opens the _fsi-out_ buffer in a split window.
* `:FsiRead` Outputs any lines written by the fsi but not yet output as vim messages
* `:FsiClear` Deletes all text from the fsi output buffer but doesn't reset the fsi session.
* `:FsiShow` Opens the _fsi-out_ buffer in a split window.
* `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.
* `leader<i>` Same as Alt-Enter

###On-the-fly syntax checking

> Interactive syntax/type checking requires vim 7.4 or higher and [syntastic][syntastic]
By 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.
By 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.
In case you would prefer not to have you errors checked continuously add the following to your vimrc:

~~~.vim
Expand Down Expand Up @@ -203,21 +203,19 @@ the syntax checker has not been loaded properly. One cause can be that your vim

~~~
:echo has('python')
:echo has('python3')
~~~

to check this. Some vims are compiled against Python3 (they return 1 to "echo has('python3')" but not "echo has('python')").
For instance, on Ubuntu 16.04, you need vim-nox-py2, not vim-nox.
to check this.

[syntastic]: https://github.com/scrooloose/syntastic
[airline]: https://github.com/bling/vim-airline
[pathogen]: https://github.com/tpope/vim-pathogen
[vim-plug]: https://github.com/junegunn/vim-plug
[NeoBundle]: https://github.com/Shougo/neobundle.vim


NB: 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.


Maintainers
-----------

Expand Down
4 changes: 1 addition & 3 deletions doc/vim-fsharp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CONTENTS *fsharp-contents*
DEPENDENCIES *fsharp-dependencies*

Required:~
- Vim 7.3 or higher with Python 2 support
- Vim 7.3 or higher with Python 2 or 3 support
- Mono OR .NET Framework
- F#

Expand Down Expand Up @@ -148,7 +148,6 @@ General commands:~
:FSharpToggleHelptext
toggles g:fsharp_completion_helptext. (See below for details)


FSharp interaction commands:~

`:FsiEval`
Expand Down Expand Up @@ -176,7 +175,6 @@ FSharp interaction commands:~
:FsiShow
Opens the _fsi-out_ buffer in a split window


===============================================================================
MAPPINGS *fsharp-mappings*

Expand Down

0 comments on commit c4a29d5

Please sign in to comment.