Skip to content

Commit e0c2001

Browse files
committed
Update README.md
Reorganize text and justify my personal key mappings.
1 parent ea2f8a6 commit e0c2001

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

README.md

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
This plugin allows you to easily execute files in the terminal or a separate
44
buffer.
55

6-
**NOTE: This plugin is currently in a pre-release state. It works at a basic level, but I don't feel like it is ready for its first "real" release. Functionality is currently being added and bugs are getting ironed out.**
6+
**NOTE: This plugin is currently in a pre-release state. It works at a basic
7+
level, but I don't feel like it is ready for its first "real" release.
8+
Functionality is currently being added and bugs are getting ironed out.**
79

810
![](https://raw.githubusercontent.com/wiki/EvanQuan/vim-executioner/executioner.PNG)
911

@@ -12,12 +14,10 @@ Table of Contents
1214
1. [Installation](#installation)
1315
2. [Usage](#usage)
1416
- [Commands](#commands)
15-
- [Command line arguments](#command-line-arguments)
1617
- [Key mappings](#key-mappings)
1718
3. [Configure Executable Files](#configure-executable-files)
1819
- [Full and base name symbols](#full-and-base-name-symbols)
1920
- [Commands](#commands-1)
20-
4. [Frequently Asked Questions]
2121

2222
## Installation
2323

@@ -65,35 +65,34 @@ This package comes with 3 commands:
6565
- `:ExecutionerHorizontal`
6666
- `:ExecutionerVertical`
6767

68-
Each command takes the name of a file as an 1 optional argument. Without any
69-
arguments, the current buffer that is executing the command will be ran.
68+
Each command takes the name of a file as an 1 optional argument, optionally
69+
followed by any command-line arguments. Without any arguments, the current
70+
buffer that is executing the command will be ran with no arguments.
7071

7172
For example:
7273
```
74+
:Executioner
75+
```
76+
will attempt to execute the current buffer.
77+
```
7378
:Executioner test.py
7479
```
75-
will attempt to execute `test.py` in the current working directory, while
80+
will attempt to execute `test.py` in the current working directory.
7681
```
77-
:Executioner
82+
:Executioner test.py foo bar 4
7883
```
79-
will attempt to execute the current buffer.
84+
will attempt to execute `test.py` in the current working directory, with the
85+
arguments `foo`, `bar` and `4`.
8086

8187
If you running a version of Vim that has the integrated terminal feature (i.e.
8288
`:echo has("terminal")` returns 1), then the horizontal and vertical commands
8389
open a terminal buffer to output the command, allowing for potential user
8490
input.
8591

8692
Without the terminal feature available, the horizontal and vertical commands
87-
stores the output of the executed program in a readonly buffer. Due to this
93+
stores the output of the executed program in a read-only buffer. Due to this
8894
reason, it will not work for programs that require user input.
8995

90-
#### Command line arguments
91-
92-
You can pass in command line arguments for Executioner to use.
93-
94-
For example, `:Executioner test.js arg1 arg2 arg3` will pass `arg1`, `arg2`,
95-
and `arg3` as arguments for the execution command on the file `test.js`.
96-
9796
#### Key mappings
9897

9998
By default, Executioner does not provide any key mappings as to not override
@@ -122,6 +121,9 @@ nnoremap <silent> <leader>hrm :ExecutionerHorizontal makefile<CR>
122121
nnoremap <silent> <leader>vrm :ExecutionerVertical makefile<CR>
123122
```
124123

124+
Due to the complexity of many projects that span a large number of files, I use
125+
makefiles and `run.sh` to compile and run code without needing to worry about
126+
what file I'm currently editing.
125127

126128
## Configure Executable Files
127129

@@ -140,7 +142,7 @@ let g:executioner#base_name = '@'
140142

141143
For example, if you want to run a C file by compiling it first, you can define
142144
its command as `'c' : 'gcc % -o @.out; ./@.out'` in `g:executioner#commands`,
143-
which will compile a `.out` fie with the same base name as the source file,
145+
which will compile a `.out` file with the same base name as the source file,
144146
and then execute it.
145147

146148
#### Commands
@@ -149,8 +151,8 @@ There are 2 dictionaries that define what types of files can be executed:
149151

150152
With `g:executioner#extensions`, Executioner can execute a command based on the
151153
extension of a file name. With `g:executioner#names`, Executioner can execute
152-
a command based on a file name. If not defined in your `.vimrc`, they are
153-
by default defined as:
154+
a command based on a file name. If not defined in your `.vimrc`, they are by
155+
default defined as:
154156

155157
```vim
156158
" extension : command
@@ -198,9 +200,3 @@ to use. For example: if `g:executioner#extensions` dictates that `py` files are
198200
to be executed with `python3` and `g:executioner#names` dictates that `foo.py`
199201
is to be executed with `python2`, then `foo.py` will be executed with
200202
`python2`.
201-
202-
## Frequently Asked Questions
203-
204-
How to run more complicated projects?
205-
- make
206-
- bash run.sh

0 commit comments

Comments
 (0)