Skip to content

Commit dbd37d1

Browse files
APL REPL added (#24)
* Updates to documentation * Added apl as plugin * README notes
1 parent e04eb42 commit dbd37d1

3 files changed

Lines changed: 23 additions & 17 deletions

File tree

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Vimteractive
33
============
44
:vimteractive: send commands from text files to interactive programs via vim
55
:Author: Will Handley
6-
:Version: 2.2.1
6+
:Version: 2.3.0
77
:Homepage: https://github.com/williamjameshandley/vimteractive
88
:Documentation: ``:help vimteractive``
99

@@ -28,6 +28,7 @@ The activating commands are
2828
- zsh ``:Izsh``
2929
- python ``:Ipython``
3030
- clojure ``:Iclojure``
31+
- apl ``:Iapl``
3132
- autodetect based on filetype ``:Iterm``
3233

3334
Commands may be sent from a text file to the chosen terminal using ``CTRL-S``.
@@ -143,6 +144,7 @@ Supported terminals
143144
- ``:Izsh`` Activate a zsh terminal
144145
- ``:Ipython`` Activate a python terminal
145146
- ``:Iclojure`` Activate a clojure terminal
147+
- ``:Iapl`` Activate an apl terminal
146148
- ``:Iterm`` Activate default terminal for this filetype
147149

148150
Sending commands
Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*vimteractive.txt* Sending commands from vim to interactive programs
1+
*vimteractive* Sending commands from vim to interactive programs
22

33
Vimteractive - main help file
44

@@ -35,6 +35,7 @@ The activating commands are
3535
- zsh |:Izsh|
3636
- python |:Ipython|
3737
- clojure |:Iclojure|
38+
- apl |:Iclojure|
3839
- autodetect based on filetype |:Iterm|
3940

4041
Commands may be sent from a text file to the chosen terminal using CTRL-S. If
@@ -44,7 +45,7 @@ there is no terminal, CTRL-S will automatically open one for you using
4445
Note: it's highly recommended to use IPython as your default Python
4546
interpreter. You can set it like this:
4647

47-
let g:vimteractive_default_shells = { 'python': 'ipython' }
48+
let g:vimteractive_default_shells = { 'python': 'ipython' }
4849

4950
Since this package leverages the native vim interactive terminal, it is
5051
only compatible with vim 8 or greater.
@@ -60,7 +61,7 @@ stty -ixon
6061
into your .bashrc (or equivalent shell profile file)
6162

6263
------------------------------------------------------------------------------
63-
Example usage *vimteractive-usage*
64+
Example usage *vimteractive-example*
6465

6566
Create a python file "test.py" with the following content:
6667

@@ -96,14 +97,15 @@ connect two buffers to one terminal, use |:Iconn| command.
9697
------------------------------------------------------------------------------
9798
Supported terminals *vimteractive-terminals*
9899

99-
*:Iipython* Activate an ipython terminal
100-
*:Ijulia* Activate a julia terminal
101-
*:Imaple* Activate a maple terminal
102-
*:Ibash* Activate a bash terminal
103-
*:Izsh* Activate a zsh terminal
104-
*:Ipython* Activate a python terminal
105-
*:Iclojure* Activate a clojure terminal
106-
*:Iterm* Activate a terminal based on current filetype
100+
*:Iipython* Activate an ipython terminal
101+
*:Ijulia* Activate a julia terminal
102+
*:Imaple* Activate a maple terminal
103+
*:Ibash* Activate a bash terminal
104+
*:Izsh* Activate a zsh terminal
105+
*:Ipython* Activate a python terminal
106+
*:Iclojure* Activate a clojure terminal
107+
*:Iapl* Activate an apl terminal
108+
*:Iterm* Activate a terminal based on current filetype
107109

108110
------------------------------------------------------------------------------
109111
Sending commands *v_CTRL_S*
@@ -141,7 +143,7 @@ interpreter, you may be on an older system which does not have bracketed paste
141143
enabled, or have other shell misbehaviour issues. You can change the default
142144
setting with
143145

144-
let g:vimteractive_bracketed_paste_default = 0
146+
let g:vimteractive_bracketed_paste_default = 0
145147

146148

147149
==============================================================================
@@ -159,23 +161,23 @@ These options can be put in your |.vimrc|, or run manually as desired:
159161
To add a new interpreter to Vimteractive, you should define
160162
g:vimteractive_commands variable. For example:
161163

162-
let g:vimteractive_commands = { 'pythonasync': 'python -m asyncio' }
164+
let g:vimteractive_commands = { 'pythonasync': 'python -m asyncio' }
163165

164166
will provide you :Ipythonasync command starting Python 3.8+ asyncio REPL.
165167
If you want to make this command default for python filetype, you should do
166168

167-
let g:vimteractive_default_shells = { 'python': 'pythonasync' }
169+
let g:vimteractive_default_shells = { 'python': 'pythonasync' }
168170

169171
If you see escape sequences appearing when you do CTRL-S for your interpreter,
170172
you may try to disable bracketed paste mode for it:
171173

172-
let g:vimteractive_bracketed_paste = { 'pythonasync': 0 }
174+
let g:vimteractive_bracketed_paste = { 'pythonasync': 0 }
173175

174176
If your interpreter has slow-starting REPL (like Clojure), you may want to
175177
wait before sending data to it at the first time. Specify time to wait in
176178
milliseconds like this:
177179

178-
let g:vimteractive_slow_prompt = { 'pythonasync': 200 }
180+
let g:vimteractive_slow_prompt = { 'pythonasync': 200 }
179181

180182
This project is very much in an beta phase, so if you have any issues that
181183
arise on your system, feel free to contact me:

plugin/vimteractive.vim

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ let g:vimteractive_commands.zsh = 'zsh'
3636
let g:vimteractive_commands.julia = 'julia'
3737
let g:vimteractive_commands.maple = 'maple -c "interface(errorcursor=false);"'
3838
let g:vimteractive_commands.clojure = 'clojure'
39+
let g:vimteractive_commands.apl = 'apl'
3940

4041
" Override default shells for different filetypes
4142
if !has_key(g:, 'vimteractive_default_shells')
@@ -53,6 +54,7 @@ let g:vimteractive_bracketed_paste.clojure = 0
5354
let g:vimteractive_bracketed_paste.python = 0
5455
let g:vimteractive_bracketed_paste.python2 = 0
5556
let g:vimteractive_bracketed_paste.python3 = 0
57+
let g:vimteractive_bracketed_paste.apl = 0
5658

5759
" If present, wait this amount of time in ms when starting term on ^S
5860
if !has_key(g:, 'vimteractive_slow_prompt')

0 commit comments

Comments
 (0)