@@ -29,20 +29,20 @@ git clone https://github.com/EvanQuan/vim-executioner.git ~/.vim/pack/plugin/sta
29
29
30
30
#### [ Vim-Plug] ( https://github.com/junegunn/vim-plug )
31
31
32
- 1 . Add ` Plug 'EvanQuan/vim-executioner' ` to your vimrc file.
33
- 2 . Reload your vimrc or restart.
32
+ 1 . Add ` Plug 'EvanQuan/vim-executioner' ` to your ` vimrc ` file.
33
+ 2 . Reload your ` vimrc ` or restart.
34
34
3 . Run ` :PlugInstall `
35
35
36
36
#### [ Vundle] ( https://github.com/VundleVim/Vundle.vim )
37
37
38
- 1 . Add ` Plugin 'EvanQuan/vim-executioner' ` to your vimrc file.
39
- 2 . Reload your vimrc or restart.
38
+ 1 . Add ` Plugin 'EvanQuan/vim-executioner' ` to your ` vimrc ` file.
39
+ 2 . Reload your ` vimrc ` or restart.
40
40
3 . Run ` :BundleInstall `
41
41
42
42
#### [ NeoBundle] ( https://github.com/Shougo/neobundle.vim )
43
43
44
- 1 . Add ` NeoBundle 'EvanQuan/vim-executioner' ` to your vimrc file.
45
- 2 . Reload your vimrc or restart.
44
+ 1 . Add ` NeoBundle 'EvanQuan/vim-executioner' ` to your ` vimrc ` file.
45
+ 2 . Reload your ` vimrc ` or restart.
46
46
3 . Run ` :NeoUpdate `
47
47
48
48
#### [ Pathogen] ( https://github.com/tpope/vim-pathogen )
@@ -92,7 +92,7 @@ reason, it will not work for programs that require user input.
92
92
#### Key mappings
93
93
94
94
By default, Executioner does not provide any key mappings as to not override
95
- mappings defined in your ` . vimrc` . You can map these commands to however you
95
+ mappings defined in your ` vimrc ` . You can map these commands to however you
96
96
like to make them easier to use.
97
97
98
98
For example, I personally use:
@@ -128,7 +128,7 @@ what file I'm currently editing.
128
128
You may want to refer to the full file name or base name in in your commands.
129
129
The full file name, which is the base name with file extension, can be referred
130
130
to by ` g:executioner#full_name ` , while the base name can be referred to by
131
- ` g:executioner#base_name ` , both which you can set in your ` . vimrc` . By default
131
+ ` g:executioner#base_name ` , both which you can set in your ` vimrc ` . By default
132
132
they are defined as:
133
133
134
134
``` vim
@@ -145,10 +145,36 @@ and then execute it.
145
145
146
146
There are 2 dictionaries that define what types of files can be executed:
147
147
148
- With ` g:executioner#extensions ` , Executioner can execute a command based on the
149
- extension of a file name. With ` g:executioner#names ` , Executioner can execute
150
- a command based on a file name. If not defined in your ` .vimrc ` , they are by
151
- default defined as:
148
+ ` g:executioner#extensions ` determines commands by file extension. For example,
149
+ if you want to execute files with the ` .foo ` extension, such as
150
+ ` hello_world.foo ` , with the ` bar ` command, (i.e. executing `bar
151
+ hello_world.foo` in the terminal), then include:
152
+ ``` vim
153
+ let g:executioner#extensions['foo'] = 'bar %'
154
+ ```
155
+ in your ` vimrc ` .
156
+
157
+ ` g:executioner#names ` determines commands by file name. For example, if you want
158
+ to execute files with the name ` echo_me.txt ` with the command `echo
159
+ echo_me.txt`, then include:
160
+ ``` vim
161
+ let g:executioner#names['echo_me.txt'] = 'echo echo_me.txt'
162
+ ```
163
+ in your ` vimrc ` .
164
+
165
+ Executioner will prioritize names over extensions when determining what command
166
+ to use. For example, if
167
+ ``` vim
168
+ let g:executioner#extension['py'] = 'python3 %'
169
+ ```
170
+ dictates that ` .py ` files are to be executed with ` python3 ` and
171
+ ``` vim
172
+ let g:executioner#names['foo.py'] = 'python2 foo.py'
173
+ ```
174
+ dictates that ` foo.py ` is to be executed with ` python2 ` , then ` foo.py ` will be
175
+ executed with ` python2 ` .
176
+
177
+ These are the default commands:
152
178
153
179
``` vim
154
180
" extension : command
@@ -180,19 +206,11 @@ let g:executioner#names = {
180
206
\}
181
207
```
182
208
183
- ` g:executioner#extensions ` determines commands by file extension. For example,
184
- if you want to execute files with the ` .foo ` extension, such as
185
- ` hello_world.foo ` , with the ` bar ` command, (i.e. executing `bar
186
- hello_world.foo` in the terminal), then the value ` 'foo' : 'bar %'` must be
187
- included in this dictionary.
188
-
189
- ` g:executioner#names ` determines commands by file name. For example, if you want
190
- to execute files with the name ` delete_me.txt ` with the command `rm
191
- delete_me.txt` , then the value ` 'delete_me.txt' : 'rm delete_me.txt'` must be
192
- included in this dictionary.
209
+ As expected, if any of these extensions or file names are defined in your
210
+ ` vimrc ` , they will take precedence over the defaults.
193
211
194
- Executioner will prioritize names over extensions when determining what command
195
- to use. For example: if ` g:executioner#extensions ` dictates that ` py ` files are
196
- to be executed with ` python3 ` and ` g:executioner#names ` dictates that ` foo.py `
197
- is to be executed with ` python2 ` , then ` foo.py ` will be executed with
198
- ` python2 ` .
212
+ If you wish to disable these defaults entirely, include:
213
+ ``` vim
214
+ let g:executioner#load_defaults = 0
215
+ ```
216
+ in your ` vimrc ` and they will not be defined .
0 commit comments