pub / helix-term

Interactive console for the Helix-Editor using TMUX
git clone https://https://src.jayvii.de/pub/helix-term.git
Home | Log | Files | Exports | Refs | README | RSS

README.md (2457B)


      1 # helix-term
      2 
      3 Please send patches or remarks to
      4 [jayvii[AT]posteo[DOT]de](mailto:jayvii[AT]posteo[DOT]de)
      5 
      6 Interactive console for the [Helix editor](https://helix-editor.com/) using the
      7 terminal multiplexer [TMUX](https://github.com/tmux/tmux/wiki).
      8 
      9 This script is primarily written for working with
     10 [R](https://www.r-project.org/) but should work with any other script language
     11 and REPL.
     12 
     13 ## Installation
     14 
     15 The scripts in "bin/" are intended to go into your "~/.local/bin/" folder, or
     16 any other directory within your "$PATH".
     17 
     18 The snippets in "helix_config.toml" belong into your helix configuration
     19 (typically located in "~/.config/helix/config.toml").
     20 
     21 You need "tmux" to be installed on your system. An example configuration is
     22 provided in "tmux.conf", which you can copy to "~/.tmux.conf"
     23 
     24 For simplicity, you can use the supplied `Makefile`, which does all of this in
     25 one command:
     26 
     27 ```bash
     28 make install
     29 ```
     30 
     31 For updating helix-term, simply pull the newest version from git
     32 (or use the tarball) and run:
     33 
     34 ```bash
     35 make update
     36 ```
     37 
     38 ## Usage
     39 
     40 Working on some script in helix, execute the "helix-term" command in another
     41 terminal window or by splitting the terminal window helix is running in
     42 (ctrl+h or ctrl+v). For example, if you want to run the R-REPL, issue
     43 following command:
     44 
     45 ```bash
     46 helix-term R
     47 ```
     48 
     49 This creates a temporary file in the current working directory
     50 "./.helix_session" containing the current session's ID (base64 encoded path).
     51 Any helix session opened with the same root path is bound to that helix-term
     52 session. Upon exiting the REPL, the session file is removed.
     53 
     54 From helix, you can now send commands to the REPL via Ctrl+C, Ctrl+C. In normal
     55 mode, this send the current code paragraph the pointer is located within. If in
     56 insert mode, the shortcut enters normal mode and goes on from there. If in
     57 selection mode, the current selection is send to the REPL.
     58 
     59 ## Advanced Usage
     60 
     61 Here are some tips which may make usage a little easier or may workaround issues
     62 I stumbled upon while using this setup.
     63 
     64 ### General
     65 
     66 1. Adding an alias for helix-term to your bash configuration. For example:
     67 
     68 ```bash
     69 echo "alias hxt=helix-term" >> ~/.bashrc
     70 echo "alias hxtr=helix-term R" >> ~/.bashrc
     71 ```
     72 
     73 ### GNU R
     74 
     75 1. Opening help-files in your web-browser rather than a "less" window in the
     76    terminal. this leads to unblocking the R-session, while looking up a
     77    function's manual:
     78 
     79 ```bash
     80 echo "options(help_type='html')" >> ~/.Rprofile
     81 ```