@@ -29,20 +29,20 @@ git clone https://github.com/EvanQuan/vim-executioner.git ~/.vim/pack/plugin/sta
2929
3030#### [ Vim-Plug] ( https://github.com/junegunn/vim-plug )
3131
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.
34343 . Run ` :PlugInstall `
3535
3636#### [ Vundle] ( https://github.com/VundleVim/Vundle.vim )
3737
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.
40403 . Run ` :BundleInstall `
4141
4242#### [ NeoBundle] ( https://github.com/Shougo/neobundle.vim )
4343
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.
46463 . Run ` :NeoUpdate `
4747
4848#### [ Pathogen] ( https://github.com/tpope/vim-pathogen )
@@ -92,7 +92,7 @@ reason, it will not work for programs that require user input.
9292#### Key mappings
9393
9494By 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
9696like to make them easier to use.
9797
9898For example, I personally use:
@@ -128,7 +128,7 @@ what file I'm currently editing.
128128You may want to refer to the full file name or base name in in your commands.
129129The full file name, which is the base name with file extension, can be referred
130130to 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
132132they are defined as:
133133
134134 ``` vim
@@ -145,10 +145,36 @@ and then execute it.
145145
146146There are 2 dictionaries that define what types of files can be executed:
147147
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:
152178
153179``` vim
154180" extension : command
@@ -180,19 +206,11 @@ let g:executioner#names = {
180206 \}
181207```
182208
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.
193211
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