Skip to content

Commit d7cc6a7

Browse files
committed
README: recommended way renew
1 parent fea2183 commit d7cc6a7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@ Vital has module system. The below is an example to import/load a module
157157

158158
```vim
159159
" Recommended way
160+
let s:O = vital#pluginname#import('Math')
161+
call s:O.lcm([2, 3, 4])
162+
" -> 12
163+
```
164+
165+
or
166+
167+
```vim
168+
" Alternate way
160169
let s:V = vital#pluginname#new()
161170
let s:O = s:V.import('Math')
162171
call s:O.lcm([2, 3, 4])
@@ -166,7 +175,7 @@ call s:O.lcm([2, 3, 4])
166175
or
167176

168177
```vim
169-
" Recommended way only if you rarely use the module
178+
" Alternate way only if you rarely use the module
170179
let s:V = vital#pluginname#new()
171180
call s:V.load('Math')
172181
call s:V.Math.lcm([2, 3, 4])

0 commit comments

Comments
 (0)