diff --git a/README.rst b/README.rst index ee9dea0..37ad305 100644 --- a/README.rst +++ b/README.rst @@ -3,7 +3,7 @@ Vimteractive ============ :vimteractive: send commands from text files to interactive programs via vim :Author: Will Handley -:Version: 2.2.1 +:Version: 2.3.0 :Homepage: https://github.com/williamjameshandley/vimteractive :Documentation: ``:help vimteractive`` @@ -28,6 +28,7 @@ The activating commands are - zsh ``:Izsh`` - python ``:Ipython`` - clojure ``:Iclojure`` +- apl ``:Iapl`` - autodetect based on filetype ``:Iterm`` Commands may be sent from a text file to the chosen terminal using ``CTRL-S``. @@ -143,6 +144,7 @@ Supported terminals - ``:Izsh`` Activate a zsh terminal - ``:Ipython`` Activate a python terminal - ``:Iclojure`` Activate a clojure terminal +- ``:Iapl`` Activate an apl terminal - ``:Iterm`` Activate default terminal for this filetype Sending commands diff --git a/doc/vimteractive.txt b/doc/vimteractive similarity index 88% rename from doc/vimteractive.txt rename to doc/vimteractive index 0aca52e..f0306b0 100644 --- a/doc/vimteractive.txt +++ b/doc/vimteractive @@ -1,4 +1,4 @@ -*vimteractive.txt* Sending commands from vim to interactive programs +*vimteractive* Sending commands from vim to interactive programs Vimteractive - main help file @@ -35,6 +35,7 @@ The activating commands are - zsh |:Izsh| - python |:Ipython| - clojure |:Iclojure| +- apl |:Iclojure| - autodetect based on filetype |:Iterm| 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 Note: it's highly recommended to use IPython as your default Python interpreter. You can set it like this: - let g:vimteractive_default_shells = { 'python': 'ipython' } + let g:vimteractive_default_shells = { 'python': 'ipython' } Since this package leverages the native vim interactive terminal, it is only compatible with vim 8 or greater. @@ -60,7 +61,7 @@ stty -ixon into your .bashrc (or equivalent shell profile file) ------------------------------------------------------------------------------ -Example usage *vimteractive-usage* +Example usage *vimteractive-example* Create a python file "test.py" with the following content: @@ -96,14 +97,15 @@ connect two buffers to one terminal, use |:Iconn| command. ------------------------------------------------------------------------------ Supported terminals *vimteractive-terminals* -*:Iipython* Activate an ipython terminal -*:Ijulia* Activate a julia terminal -*:Imaple* Activate a maple terminal -*:Ibash* Activate a bash terminal -*:Izsh* Activate a zsh terminal -*:Ipython* Activate a python terminal -*:Iclojure* Activate a clojure terminal -*:Iterm* Activate a terminal based on current filetype +*:Iipython* Activate an ipython terminal +*:Ijulia* Activate a julia terminal +*:Imaple* Activate a maple terminal +*:Ibash* Activate a bash terminal +*:Izsh* Activate a zsh terminal +*:Ipython* Activate a python terminal +*:Iclojure* Activate a clojure terminal +*:Iapl* Activate an apl terminal +*:Iterm* Activate a terminal based on current filetype ------------------------------------------------------------------------------ Sending commands *v_CTRL_S* @@ -141,7 +143,7 @@ interpreter, you may be on an older system which does not have bracketed paste enabled, or have other shell misbehaviour issues. You can change the default setting with - let g:vimteractive_bracketed_paste_default = 0 + let g:vimteractive_bracketed_paste_default = 0 ============================================================================== @@ -159,23 +161,23 @@ These options can be put in your |.vimrc|, or run manually as desired: To add a new interpreter to Vimteractive, you should define g:vimteractive_commands variable. For example: - let g:vimteractive_commands = { 'pythonasync': 'python -m asyncio' } + let g:vimteractive_commands = { 'pythonasync': 'python -m asyncio' } will provide you :Ipythonasync command starting Python 3.8+ asyncio REPL. If you want to make this command default for python filetype, you should do - let g:vimteractive_default_shells = { 'python': 'pythonasync' } + let g:vimteractive_default_shells = { 'python': 'pythonasync' } If you see escape sequences appearing when you do CTRL-S for your interpreter, you may try to disable bracketed paste mode for it: - let g:vimteractive_bracketed_paste = { 'pythonasync': 0 } + let g:vimteractive_bracketed_paste = { 'pythonasync': 0 } If your interpreter has slow-starting REPL (like Clojure), you may want to wait before sending data to it at the first time. Specify time to wait in milliseconds like this: - let g:vimteractive_slow_prompt = { 'pythonasync': 200 } + let g:vimteractive_slow_prompt = { 'pythonasync': 200 } This project is very much in an beta phase, so if you have any issues that arise on your system, feel free to contact me: diff --git a/plugin/vimteractive.vim b/plugin/vimteractive.vim index 45ed70b..4a55744 100644 --- a/plugin/vimteractive.vim +++ b/plugin/vimteractive.vim @@ -36,6 +36,7 @@ let g:vimteractive_commands.zsh = 'zsh' let g:vimteractive_commands.julia = 'julia' let g:vimteractive_commands.maple = 'maple -c "interface(errorcursor=false);"' let g:vimteractive_commands.clojure = 'clojure' +let g:vimteractive_commands.apl = 'apl' " Override default shells for different filetypes if !has_key(g:, 'vimteractive_default_shells') @@ -53,6 +54,7 @@ let g:vimteractive_bracketed_paste.clojure = 0 let g:vimteractive_bracketed_paste.python = 0 let g:vimteractive_bracketed_paste.python2 = 0 let g:vimteractive_bracketed_paste.python3 = 0 +let g:vimteractive_bracketed_paste.apl = 0 " If present, wait this amount of time in ms when starting term on ^S if !has_key(g:, 'vimteractive_slow_prompt')