1- *executioner.txt* For Vim version 8.1 Last change: 2018 December 23
1+ *executioner.txt* For Vim version 8.1 Last change: 2018 December 25
22
33 _____ _ _ ~
44 | ___| | | (_) ~
@@ -22,7 +22,6 @@ CONTENTS *executioner-contents*
2222 2.1 Commands............................| executioner-commands |
2323 2.2 Variables...........................| executioner-variables |
2424 3. Mappings.................................| executioner-mappings |
25- 4. About....................................| executioner-about |
2625
2726==============================================================================
28271. Intro *executioner-intro*
@@ -36,22 +35,39 @@ version of the plugin from:
3635==============================================================================
37362. Functionality *executioner-functionality*
3837
39- TODO
38+ There are two aspects to this plugin: configuring files to be ran, and running
39+ them. The commands let you run files in a Vim session, while the variables let
40+ you configure how certain files are to be ran.
4041
4142------------------------------------------------------------------------------
42432.1 Commands *executioner-commands*
4344
4445:Executioner [file] [args] *:Executioner*
4546
46- TODO
47+ The file will be executed in in a | shell | , where any output will be printed
48+ there.
4749
4850:ExecutionerHorizontal [file] [args] *:ExecutionerHorizontal*
4951
50- TODO
52+ If Vim has | terminal | window support, then the file will be executed in
53+ a horizontally-split terminal window. Once the program is completed, the
54+ output will be saved in a 'readonly' buffer.
55+
56+ Otherwise, the file will be executed in a shell and its output will be saved
57+ in a horizontally-split 'readonly' buffer. The difference is that without
58+ | terminal | support, no input from the user can be made during the program's
59+ runtime.
5160
5261:ExecutionerVertical [file] [args] *:ExecutionerVertical*
5362
54- TODO
63+ If Vim has | terminal | window support, then the file will be executed in
64+ a vertically-split terminal window. Once the program is completed, the
65+ output will be saved in a 'readonly' buffer.
66+
67+ Otherwise, the file will be executed in a shell and its output will be saved
68+ in a vertically-split 'readonly' buffer. The difference is that without
69+ | terminal | support, no input from the user can be made during the program's
70+ runtime.
5571
5672------------------------------------------------------------------------------
57732.2 Variables *executioner-variables*
@@ -128,7 +144,15 @@ Type: |Dictionary|
128144 'swift' : 'swiftc % -o @.out;./@.out',
129145 }
130146<
131- TODO
147+ This determines commands by file extension. For example, if you want to
148+ execute files with the `py ` extension, such as `hello_world.py ` , with the
149+ `python ` command, (i.e. executing `python hello_world.py` in the terminal),
150+ then include: >
151+
152+ let g:executioner#extensions['py'] = 'python %'
153+ <
154+ in your | vimrc | .
155+
132156
133157g:executioner#names *g:executioner#names*
134158
@@ -137,27 +161,57 @@ Type: |Dictionary|
137161 Value: | String |
138162Default: `{'makefile' : 'make' }`
139163
140- TODO
164+ This determines commands by file name. For example, if you want to execute
165+ files with the name `makefile` with the command `make ` , then include: >
166+
167+ let g:executioner#names['makefile'] = 'make'
168+ <
169+ in your | vimrc | .
170+
141171
142172g:executioner#load_defaults *g:executioner#load_defaults*
143173
144174Type: | Number |
145175Default: `1 `
146176
147- TODO
177+ If you wish to disable the default values of | g:executioner#extensions | and
178+ | g:executioner#names | entirely, then include: >
179+
180+ let g:executioner#load_defaults = 0
181+ <
182+ in your | vimrc | .
148183
149184==============================================================================
1501853. Mappings *executioner-mappings*
151186
152- TODO
153-
154- ==============================================================================
155- 4. About *executioner-about*
187+ By default, Executioner does not provide any key mappings as to not override
188+ mappings defined in your | vimrc | . You can map these commands to however you
189+ like to make them easier to use.
190+
191+ For example, I personally use: >
192+
193+ " Run current buffer
194+ "
195+ nnoremap <silent> <leader>rf :Executioner<Return>
196+ nnoremap <silent> <leader>hrf :ExecutionerHorizontal<Return>
197+ nnoremap <silent> <leader>vrf :ExecutionerVertical<Return>
198+
199+ " run.sh
200+ "
201+ nnoremap <silent> <leader>rr :Executioner run.sh<Return>
202+ nnoremap <silent> <leader>hrr :ExecutionerHorizontal run.sh<Return>
203+ nnoremap <silent> <leader>vrr :ExecutionerVertical run.sh<Return>
204+
205+ " Makefile
206+ "
207+ nnoremap <silent> <leader>rm :Executioner makefile<Return>
208+ nnoremap <silent> <leader>hrm :ExecutionerHorizontal makefile<Return>
209+ nnoremap <silent> <leader>vrm :ExecutionerVertical makefile<Return>
210+ <
156211
157- Executioner is authored by a poor Computer Science student studing at the
158- University of Calgary, named Evan Quan (https://github.com/EvanQuan/ ).
159- Aftering being exposed to a fair number of languages across his degree, Evan
160- was often frustrated by a lack of unified means to execute his code in Vim.
212+ Due to the complexity of many projects that span a large number of files,
213+ I use makefiles and `run.sh ` to compile and run large projects without needing
214+ to worry about what file I'm currently editing.
161215
162216------------------------------------------------------------------------------
163217vim:tw=78:ts=8:ft=help:noet:expandtab
0 commit comments