Skip to content

Commit 45df393

Browse files
committed
README,vital.txt: refine use your_plugin_name/dir
1 parent 9696f02 commit 45df393

File tree

2 files changed

+24
-26
lines changed

2 files changed

+24
-26
lines changed

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -117,47 +117,46 @@ Module | Description
117117
### Install modules for your own plugin
118118

119119
Use `:Vitalize` to install modules.
120-
Assuming your Vim plugin name is `pluginname`.
120+
Assuming your Vim plugin name is `your_plugin_name` and plugin directory is `your_plugin_dir`.
121121
Please see [the help](doc/vitalizer.txt) for more details.
122122

123123
```vim
124-
:Vitalize --name=pluginname $HOME/.vim/bundle/pluginname/
124+
:Vitalize --name=your_plugin_name $HOME/.vim/bundle/your_plugin_dir/
125125
```
126126

127127
You can also install only specified modules; recommended for making your
128128
repository size small, assuming you are going to upload it to a remote
129129
repository
130130

131131
```vim
132-
:Vitalize --name=pluginname $HOME/.vim/bundle/pluginname/ Data.String Data.List
132+
:Vitalize --name=your_plugin_name $HOME/.vim/bundle/your_plugin_dir/ Data.String Data.List
133133
```
134134

135135
### Use vital functions
136136

137-
Assuming your Vim plugin name is `pluginname`. You can define your utility
138-
function set `pluginname#util` just by
137+
Assuming your Vim plugin name is `your_plugin_name`. You can define your utility
138+
function set `your_plugin_name#util` just by
139139

140140
```vim
141-
let s:V = vital#pluginname#new()
142-
let s:process = s:V.import('System.Process')
141+
let s:Process = vital#your_plugin_name#import('System.Process')
143142
144-
function! pluginname#util#system(...)
145-
return s:process.execute(a:000)
143+
function! your_plugin_name#util#system(...)
144+
return s:Process.execute(a:000)
146145
endfunction
147146
" run
148-
" echo pluginname#util#system('echo','abc')
147+
" echo your_plugin_name#util#system('echo','abc')
149148
" -> $ echo abc
150149
```
151150

152-
and then you can call functions by `pluginname#util#system()`, without taking care
151+
and then you can call functions by `your_plugin_name#util#system()`, without taking care
153152
of `vital.vim` itself. It's all hidden.
154153

155154
Vital has module system. The below is an example to import/load a module
156155
`Math` and to call a function `lcm()` of the module.
157156

158157
```vim
159158
" Recommended way
160-
let s:M = vital#pluginname#import('Math')
159+
let s:M = vital#your_plugin_name#import('Math')
161160
call s:M.lcm([2, 3, 4])
162161
" -> 12
163162
```
@@ -166,7 +165,7 @@ or
166165

167166
```vim
168167
" Alternative way
169-
let s:V = vital#pluginname#new()
168+
let s:V = vital#your_plugin_name#new()
170169
let s:M = s:V.import('Math')
171170
call s:M.lcm([2, 3, 4])
172171
" -> 12
@@ -176,7 +175,7 @@ or
176175

177176
```vim
178177
" Alternative way only if you rarely use the module
179-
let s:V = vital#pluginname#new()
178+
let s:V = vital#your_plugin_name#new()
180179
call s:V.load('Math')
181180
call s:V.Math.lcm([2, 3, 4])
182181
" -> 12
@@ -186,7 +185,7 @@ or
186185

187186
```vim
188187
" Available, but we don't recommend this very much
189-
let s:V = vital#pluginname#new()
188+
let s:V = vital#your_plugin_name#new()
190189
call s:V.import('Math', s:)
191190
call s:lcm([2, 3, 4])
192191
" -> 12

doc/vital.txt

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,40 +36,39 @@ Please read the docs of each module before using them.
3636
==============================================================================
3737
USAGE *Vital-usage*
3838

39-
Assuming your Vim plugin name is "pluginname". You can define your utility
40-
function set "pluginname#util" just by
39+
Assuming your Vim plugin name is "your_plugin_name". You can define your utility
40+
function set "your_plugin_name#util" just by
4141
>
42-
let s:V = vital#pluginname#new()
43-
let s:process = s:V.import('System.Process')
42+
let s:Process = vital#your_plugin_name#import('System.Process')
4443
45-
function! pluginname#util#system(...)
46-
return s:process.execute(a:000)
44+
function! your_plugin_name#util#system(...)
45+
return s:Process.execute(a:000)
4746
endfunction
4847
<
49-
and then you can call functions by 'pluginname#util#system()', without taking
48+
and then you can call functions by 'your_plugin_name#util#system()', without taking
5049
care of |vital.vim| itself. It's all hidden.
5150

5251
|Vital| has module system. The below is an example to import/load a module
5352
"Math" and to call a function "lcm()" of the module.
5453
>
55-
let s:M = vital#pluginname#import('Math')
54+
let s:M = vital#your_plugin_name#import('Math')
5655
call s:M.lcm([2, 3, 4])
5756
<
5857
or
5958
>
60-
let s:V = vital#pluginname#new()
59+
let s:V = vital#your_plugin_name#new()
6160
let s:M = s:V.import('Math')
6261
call s:M.lcm([2, 3, 4])
6362
<
6463
or
6564
>
66-
let s:V = vital#pluginname#new()
65+
let s:V = vital#your_plugin_name#new()
6766
call s:V.load('Math')
6867
call s:V.Math.lcm([2, 3, 4])
6968
<
7069
or
7170
>
72-
let s:V = vital#pluginname#new()
71+
let s:V = vital#your_plugin_name#new()
7372
call s:V.import('Math', s:)
7473
call s:lcm([2, 3, 4])
7574
<

0 commit comments

Comments
 (0)