-
Notifications
You must be signed in to change notification settings - Fork 36
/
psc-ide-vim.txt
140 lines (120 loc) · 3.51 KB
/
psc-ide-vim.txt
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
PureScript psc ide integration *psc-ide-vim* *purs*
COMPLETION *purs-completion*
The plugin provides omni completion |i_CTRL-X_CTRL-O| for your PureScript
coding and user completion so you can complete with |i_CTRL-X_CTRL-U| too.
The 'omnifunc' is though to provide as thigh list of results as possible,
while the user completion is though to find as many results as possible.
Both completion function will work with qualified and unqualified
indentifiers.
Also many of the commands can be completed.
PURS SERVER COMMANDS *purs-server-commands*
*:Plist*
>
:Plist
<List loaded modules.
*:Pload*
>
:Pload[!]
<Load externs, with optional |<bang>|, first reset loaded modules.
*:Pcwd*
>
:Pcwd
<Show current working directory.
*:Pend*
>
:Pend
<Shut down the server.
*:Prebuild*
>
:Prebuild[!]
<Rebuild current buffer, with optional |<bang>| first reload the modules.
EDITING COMMANDS *purs-editing-commands*
*:PaddClause*
>
:PaddClause
<Generate function template from a function signature on the current line.
*:PaddType*
>
:PaddType
<Add type annotation to a function on the current line, e.g. if you use this
command over the line
>
concat :: forall a b. Show a => Show b => a -> b -> String
<
It will produce:
>
concat :: forall a b. Show a => Show b => a -> b -> String
concat _ _ = ?concat
<
*:Papply*
>
:Papply[!]
<Apply current line suggestion if there is any. With |<bang>| applies all
suggestions. Warning that have suggestion are indicated with 'V' in the quick
fix list.
*:Pcase*
>
:Pcase[!] type
<Add case expression for give type, with optional |<bang>| it will also
include type annotations, e.g. starting with
>
myCase :: Either String Int -> String
myCase _ = ?s< -- cursor over `_`
then using `:Pcase Either String Int` and will put
>
myCase :: Either String Int -> String
myCase (Left _) = ?s
myCase (Right _) = ?s
<It also works over case expressions:
>
myCase :: Either String Int -> String
myCase a = case a of
_ -> ?s -- cursor over `_`
<will result with
>
myCase :: Either String Int -> String
myCase a = case a of
(Left _) -> ?s
(Right _) -> ?s
<
IMPORT COMMANDS *purs-import-commands*
*:Pimport*
>
:Pimport [ident]
<Import identifier. It might be qualified if you have qualified imports. If
identifier is not given as an argument the word under the cursro is taken.
The identifier can be qualified, i.e. `List.length` then the qualifier will be
preserved. If there is already a module imported with the same qualified the
new import will be added to that import declaration.
*:PimportModule*
>
:PimportModule ident [qualificier]
<Import module (possibly as qualificied module).
*:Pimports*
>
:Pimports
<List imports.
*:PaddImportQualifications*
>
:PaddImportQualifications
<
SEARCH COMMANDS *purs-search-commands*
*:Pgoto*
>
:Pgoto [ident]
<Goto identifier. You can use qualified identifiers if you have qualified
imports. If identifier is not given the word under the cursor is taken.
*:Pursuit*
>
:Pursuit [ident]
<Search pursuit for ident. If not present the word under the cursor is taken.
*:Ptype*
>
:Ptype[!] [ident]
<Find type of ident. If ident is not given the word under the cursor is
taken.
*:Psearch*
>
:Psearch ident
<Search for identifier. This works like the provided 'omnifunc', but with
less filtering.