blob: bc2a4657d53a8c9d9968dffa8612b016296e1ae6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
|
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fsharp') == -1
*vim-fsharp.txt* F# support for Vim
*FSharp* *F#* *fsharp* *vim-fsharp*
===============================================================================
# #
# ███████╗███████╗██╗ ██╗ █████╗ ██████╗ ██████╗ #
# ██╔════╝██╔════╝██║ ██║██╔══██╗██╔══██╗██╔══██╗ #
# █████╗ ███████╗███████║███████║██████╔╝██████╔╝ #
# ██╔══╝ ╚════██║██╔══██║██╔══██║██╔══██╗██╔═══╝ #
# ██║ ███████║██║ ██║██║ ██║██║ ██║██║ #
# ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ #
# #
===============================================================================
CONTENTS *fsharp-contents*
1. Dependencies.................................|fsharp-dependencies|
2. Usage........................................|fsharp-usage|
3. Options......................................|fsharp-options|
4. Commands.....................................|fsharp-commands|
5. Mappings.....................................|fsharp-mappings|
6. Credits......................................|fsharp-credits|
===============================================================================
DEPENDENCIES *fsharp-dependencies*
Required:~
- Vim 7.3 or higher with Python 2 or 3 support
- Mono OR .NET Framework
- F#
Optional:~
- Syntastic plugin (for syntax and type checking)
NOTE: Must be enabled (see |'g:syntastic_fsharp_checkers'|)
===============================================================================
USAGE *fsharp-usage*
Syntax highlighting and linting will trigger upon opening a `*.fs`, `*.fsi`,
or `*.fsx` file. Using omni completion will begin the fsautocomplete process.
Suggestion: Install a completer such as NeoComplete or SuperTab
===============================================================================
OPTIONS *fsharp-options*
*'g:syntastic_fsharp_checkers'*
Use this option to enable syntastic integration >
let g:syntastic_fsharp_checkers=['syntax']
<
*'g:fsharp_only_check_errors_on_write'*
Use this option to disable "on the fly" syntax checking >
let g:fsharp_only_check_errors_on_write = 1
<
*'g:fsharpbinding_debug'*
Use this option to enable debug-mode and inspect fsautocomplete behavior: >
let g:fsharpbinding_debug = 1
<
This will create two log files `log.txt` and `log2.txt` in your temporary folder
(i.e. `/tmp/`)
*'g:fsharp_xbuild_path'*
Use this option set the msbuild/xbuild path >
let g:fsharp_xbuild_path = "/path/to/xbuild/or/msbuild"
<
*'g:fsharp_test_runner'*
Use this option to point to a suitable test runner (such as nunit-console.exe) >
let g:fsharp_test_runner = "/path/to/test/runner"
<
*'g:fsharp_completion_helptext'*
Use this option to disable helptext during auto completion. Turn off if
completion is too slow >
let g:fsharp_completion_helptext = 0
<
*'g:fsharp_map_keys'*
Use this option to disable default bindings >
let g:fsharp_map_keys = 0
<
*'g:fsharp_map_prefix'*
Use this option to override the default prefix of `<leader>` >
let g:fsharp_map_prefix = 'cp'
<
Set to `cp` in this example
*'g:fsharp_map_fsisendline'*
Use this option to override the default mapping to send the current line to
fsharp interactive >
let g:fsharp_map_fsisendline = 'p'
<
Set to `p` in this example
*'g:fsharp_map_fsisendsel'*
Use this option to override the default mapping to send the current selection
to fsharp interactive >
let g:fsharp_map_fsisendsel = 'p'
<
Set to `p` in this example
*'g:fsharp_map_gotodecl'*
Use this option to override the default mapping to go to declaration in the
current window >
let g:fsharp_map_gotodecl = 'g'
<
Set to `g` in this example
*'g:fsharp_map_gobackfromdecl'*
Use this option to override the default mapping to go back to where go to
declaration was triggered >
let g:fsharp_map_gobackfromdecl = 'b'
<
Set to `b` in this example
*'g:fsharp_map_fsiinput'*
Override the default mapping to evaluate an fsharp expression in the fsi >
let g:fsharp_map_fsiinput = 'i'
<
===============================================================================
COMMANDS *fsharp-commands*
General commands:~
*:make*
:make
Calls xbuild on the fsproj for the current file (if any).
*:FSharpParseProject*
:FSharpParseProject
Reparses all the project files and dependencies (this is done automatically
when opening a .fs or .fsi file).
*:FSharpBuildProject*
:FSharpBuildProject
Calls xbuild on the fsproj for the current file (if any). Can also take a
path to the proj file to build.
*:FSharpRunProject*
:FSharpRunProject
Runs the project for the current file (if any).
*:FSharpRunTests*
: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*
:FSharpToggleHelptext
toggles g:fsharp_completion_helptext. (See below for details)
FSharp interaction commands:~
`:FsiEval`
:FsiEval
Evaluates an fsharp expression in the fsi
`:FsiEvalBuffer`
:FsiEvalBuffer
Evaluates the entire buffer in the fsi
`:FsiReset`
:FsiReset
Resets the current fsharp interactive
`:FsiRead`
:FsiRead
Outputs any lines written by the fsi but not yet output as vim messages
`:FsiClear`
:FsiClear
Deletes all text from the fsi output buffer but doesn't reset the fsi
session.
`:FsiShow`
:FsiShow
Opens the _fsi-out_ buffer in a split window
===============================================================================
MAPPINGS *fsharp-mappings*
General:~
<leader>t
Echoes the type of the expression currently pointed to by the cursor
<leader>d
Go to declaration in current window
<leader>s
Takes you back from where go to declaration was triggered. Experimental
FSharp Interactive:~
<A-CR> OR
<leader>i
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.
===============================================================================
CREDITS *fsharp-credits*
Syntax and indent files by kongo2002 <github.com/kongo2002>:
http://github.com/kongo2002/fsharp-vim
Adapted from Tim Robinson <github.com/timrobinson>:
http://github.com/timrobinson/fsharp-vim
>
===============================================================================
endif
|