aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-30 22:41:17 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-07-31 16:49:50 -0400
commit3577aec3617540ac58d3ab41e8fa163f75e859b7 (patch)
tree411f32412418d66e961d73a11519ee334ef6288e
parentf9925688329fb02b46e524cd31ac733f37549eeb (diff)
Move editors README to markdown
-rw-r--r--README.md2
-rw-r--r--docs/editors/index.html33
-rw-r--r--docs/index.html2
-rw-r--r--docs/keymap.html2
-rw-r--r--editors/README.md49
-rw-r--r--editors/README.txt49
6 files changed, 85 insertions, 52 deletions
diff --git a/README.md b/README.md
index 5a08f16a..c4557c8d 100644
--- a/README.md
+++ b/README.md
@@ -54,7 +54,7 @@ More snippets are programmed into the live demo at the top of the page: hit the
## How do I work with the character set?
-Right at the beginning, you can use the bar above the online REPL to enter BQN code: hover over a character to see a short description, and click to insert it into the editor. But you'll soon want to skip the clicking and use keyboard input. I type the special characters using a backslash escape, so that, for example, typing `\` then `z` writes `⥊` (the backslash character itself is not used by BQN). The online REPL supports this method out of the box, and configuration files to enable it in various other places are included with the [editor plugins](https://github.com/mlochbaum/BQN/tree/master/editors). There's also a [bookmarklet](https://abrudz.github.io/lb/bqn) you can use to enable BQN input in any webpage in your browser.
+Right at the beginning, you can use the bar above the online REPL to enter BQN code: hover over a character to see a short description, and click to insert it into the editor. But you'll soon want to skip the clicking and use keyboard input. I type the special characters using a backslash escape, so that, for example, typing `\` then `z` writes `⥊` (the backslash character itself is not used by BQN). The online REPL supports this method out of the box, and the [editor plugins](editors/README.md) include or link to ways to enable it for editors, browsers, shells, and so on.
The [font comparison page](https://mlochbaum.github.io/BQN/fonts.html) shows several fonts that support BQN (including the one used on this site, BQN386). Most other monospace fonts are missing some BQN characters, such as double-struck letters `𝕨`, `𝕩` and so on, which will cause these characters to be rendered with a fallback font and possibly have the wrong width or look inconsistent.
diff --git a/docs/editors/index.html b/docs/editors/index.html
new file mode 100644
index 00000000..3240ac0a
--- /dev/null
+++ b/docs/editors/index.html
@@ -0,0 +1,33 @@
+<head>
+ <link href="../favicon.ico" rel="shortcut icon" type="image/x-icon"/>
+ <link href="../style.css" rel="stylesheet"/>
+ <title>BQN: Editor support</title>
+</head>
+<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a> / <a href="../index.html">main</a></div>
+<h1 id="editor-support">Editor support</h1>
+<style>.Comment,.Function,.Number,.String { color: inherit; }</style>
+<p>Editor plugins and other tools for allowing BQN input are in <a href="https://github.com/mlochbaum/BQN/tree/master/editors">this folder</a>. Input is always performed with a backslash <code><span class='Value'>\</span></code> prefix by default, using the layout shown <a href="https://mlochbaum.github.io/BQN/keymap.html">here</a>. To type an actual backslash, hit the backslash key twice.</p>
+<p><a href="https://abrudz.github.io/lb/bqn">This bookmarklet</a> enables BQN input in any webpage in your <strong>browser</strong>.</p>
+<p><a href="https://gist.github.com/dzaima/35ca0ce12b5e215a62460f00e693984f">This userscript</a> highlights BQN code on <strong>GitHub</strong>.</p>
+<p>For <strong>Android</strong>, <a href="https://github.com/dzaima/hackerskeyboard/releases/latest">this fork</a> adds APL and BQN to Hacker's Keyboard.</p>
+<p>The file <a href="https://github.com/mlochbaum/BQN/blob/master/editors/inputrc">inputrc</a> can be copied or appended to <code><span class='Value'>~</span><span class='Function'>/</span><span class='Value'>.inputrc</span></code> to enable backslash input in <strong>bash</strong>, BQN with <strong>rlwrap</strong>, and other software that uses GNU Readline.</p>
+<p>If you'd like to contribute files for another editor I'd gladly accept them!</p>
+<h3 id="xkb">XKB</h3>
+<p>The file <a href="https://github.com/mlochbaum/BQN/blob/master/editors/bqn">bqn</a> is for configuring XKB on Linux. To use, copy it to <code><span class='Function'>/</span><span class='Value'>usr</span><span class='Function'>/</span><span class='Value'>share</span><span class='Function'>/X11/</span><span class='Value'>xkb</span><span class='Function'>/</span><span class='Value'>symbols</span><span class='Function'>/</span></code>, then run</p>
+<pre><span class='Value'>$</span> <span class='Value'>setxkbmap</span> <span class='Function'>-</span><span class='Value'>layout</span> <span class='Value'>us</span><span class='Separator'>,</span><span class='Value'>bqn</span> <span class='Function'>-</span><span class='Value'>option</span> <span class='Value'>grp:switch</span>
+</pre>
+<p>replacing <code><span class='Value'>us</span></code> with your ordinary keyboard layout. <code><span class='Value'>switch</span></code> indicates the right alt key and can be replaced with <code><span class='Value'>lswitch</span></code> for left alt or other codes. The setting will go away on shutdown so you will probably want to configure it to run every time you start up. The way to do this depends on your desktop environment. For further discussion, see <a href="https://en.wikipedia.org/wiki/X_keyboard_extension">Wikipedia</a> or the <a href="https://aplwiki.com/wiki/Typing_glyphs_on_Linux">APL Wiki</a>.</p>
+<p>Another XKB option, if you have a compose key enabled, is to place <a href="https://github.com/mlochbaum/BQN/blob/master/editors/XCompose">XCompose</a> (possibly with adjustments) in <code><span class='Value'>~</span><span class='Function'>/</span><span class='Value'>.</span><span class='Function'>XCompose</span></code>.</p>
+<h3 id="vim">Vim</h3>
+<p>Copy or symlink all files into the corresponding directories in <code><span class='Value'>~</span><span class='Function'>/</span><span class='Value'>.vim</span></code>. Add the following two lines to <code><span class='Value'>~</span><span class='Function'>/</span><span class='Value'>.vim</span><span class='Function'>/</span><span class='Value'>filetype.vim</span></code>:</p>
+<pre> <span class='Value'>au</span><span class='Function'>!</span> <span class='Function'>BufRead</span><span class='Separator'>,</span><span class='Function'>BufNewFile</span> <span class='Value'>*.bqn</span> <span class='Value'>setf</span> <span class='Value'>bqn</span>
+ <span class='Value'>au</span><span class='Function'>!</span> <span class='Function'>BufRead</span><span class='Separator'>,</span><span class='Function'>BufNewFile</span> <span class='Value'>*</span> <span class='Value'>if</span> <span class='Value'>getline</span><span class='Paren'>(</span><span class='Number'>1</span><span class='Paren'>)</span> <span class='Function'>=</span><span class='Value'>~</span> <span class='String'>'</span><span class='Value'>^</span><span class='Comment'>#!.*bqn$' | setf bqn | endif
+</span></pre>
+<p>Include <code><span class='Value'>syntax</span> <span class='Value'>on</span></code> in your .vimrc for syntax highlighting and <code><span class='Value'>filetype</span> <span class='Value'>plugin</span> <span class='Value'>on</span></code> for keyboard input.</p>
+<h3 id="emacs">Emacs</h3>
+<p>Add the following two lines to <code><span class='Value'>init.el</span></code> (usually <code><span class='Value'>~</span><span class='Function'>/</span><span class='Value'>.emacs.d</span><span class='Function'>/</span><span class='Value'>init.el</span></code>), replacing the path appropriately.</p>
+<pre><span class='Paren'>(</span><span class='Value'>add</span><span class='Function'>-</span><span class='Value'>to</span><span class='Function'>-</span><span class='Value'>list</span> <span class='String'>'</span><span class='Value'>load</span><span class='Function'>-</span><span class='Value'>path</span> <span class='String'>&quot;/path/to/BQN/editors/emacs&quot;</span><span class='Paren'>)</span>
+<span class='Paren'>(</span><span class='Value'>require</span> <span class='String'>'</span><span class='Value'>gnu</span><span class='Function'>-</span><span class='Value'>apl</span><span class='Function'>-</span><span class='Value'>mode</span><span class='Paren'>)</span>
+</pre>
+<h3 id="kakoune">Kakoune</h3>
+<p>Copy or symlink <code><span class='Value'>kak</span><span class='Function'>/</span><span class='Value'>autoload</span><span class='Function'>/</span><span class='Value'>filetype</span><span class='Function'>/</span><span class='Value'>bqn.kak</span></code> into <code><span class='Value'>autoload</span><span class='Function'>/</span><span class='Value'>filetype</span></code> in your Kakoune config directory (probably <code><span class='Value'>.config</span><span class='Function'>/</span><span class='Value'>kak</span><span class='Function'>/</span></code>).</p>
diff --git a/docs/index.html b/docs/index.html
index 7a23a015..b90a5921 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -50,7 +50,7 @@
</pre>
<p>More snippets are programmed into the live demo at the top of the page: hit the arrow at the right of the code window to see them. For longer samples, you can <a href="https://github.com/mlochbaum/BQN/blob/master/src/c.bqn">gaze into the abyss</a> that is the self-hosted compiler, or the <a href="https://github.com/mlochbaum/BQN/blob/master/src/r1.bqn">shallower but wider abyss</a> of the runtime, or take a look at the friendlier <a href="https://github.com/mlochbaum/BQN/blob/master/md.bqn">markdown processor</a> used to format and highlight documentation files. This repository also has <a href="https://github.com/mlochbaum/BQN/blob/master/examples/fifty.bqn">some translations</a> from <a href="https://www.jsoftware.com/papers/50/">&quot;A History of APL in 50 Functions&quot;</a>.</p>
<h2 id="how-do-i-work-with-the-character-set">How do I work with the character set?</h2>
-<p>Right at the beginning, you can use the bar above the online REPL to enter BQN code: hover over a character to see a short description, and click to insert it into the editor. But you'll soon want to skip the clicking and use keyboard input. I type the special characters using a backslash escape, so that, for example, typing <code><span class='Value'>\</span></code> then <code><span class='Value'>z</span></code> writes <code><span class='Function'>⥊</span></code> (the backslash character itself is not used by BQN). The online REPL supports this method out of the box, and configuration files to enable it in various other places are included with the <a href="https://github.com/mlochbaum/BQN/tree/master/editors">editor plugins</a>. There's also a <a href="https://abrudz.github.io/lb/bqn">bookmarklet</a> you can use to enable BQN input in any webpage in your browser.</p>
+<p>Right at the beginning, you can use the bar above the online REPL to enter BQN code: hover over a character to see a short description, and click to insert it into the editor. But you'll soon want to skip the clicking and use keyboard input. I type the special characters using a backslash escape, so that, for example, typing <code><span class='Value'>\</span></code> then <code><span class='Value'>z</span></code> writes <code><span class='Function'>⥊</span></code> (the backslash character itself is not used by BQN). The online REPL supports this method out of the box, and the <a href="editors/index.html">editor plugins</a> include or link to ways to enable it for editors, browsers, shells, and so on.</p>
<p>The <a href="https://mlochbaum.github.io/BQN/fonts.html">font comparison page</a> shows several fonts that support BQN (including the one used on this site, BQN386). Most other monospace fonts are missing some BQN characters, such as double-struck letters <code><span class='Value'>𝕨</span></code>, <code><span class='Value'>𝕩</span></code> and so on, which will cause these characters to be rendered with a fallback font and possibly have the wrong width or look inconsistent.</p>
<h2 id="why-would-i-use-it">Why would I use it?</h2>
<p>There are plenty of clean, modern languages out there, and a good number of array languages. I don't think any other language fits both descriptions quite so well as BQN, and I find the combination lets me write powerful and reliable programs quickly. What you find in the language will depend on your background.</p>
diff --git a/docs/keymap.html b/docs/keymap.html
index 1e4881db..0597bb52 100644
--- a/docs/keymap.html
+++ b/docs/keymap.html
@@ -30,4 +30,4 @@
└───────────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────┴────────────┘
Space: <span class='Ligature'>‿</span>
</pre></div>
-<p>See also the <a href="https://github.com/mlochbaum/BQN/tree/master/editors">editor plugins</a> (and other input methods) and <a href="doc/primitive.html">primitive</a> documentation.</p>
+<p>See also the <a href="https://mlochbaum.github.io/BQN/editors/index.html">editor plugins</a> (and other input methods) and <a href="doc/primitive.html">primitive</a> documentation.</p>
diff --git a/editors/README.md b/editors/README.md
new file mode 100644
index 00000000..0c77d184
--- /dev/null
+++ b/editors/README.md
@@ -0,0 +1,49 @@
+*View this file with results and syntax highlighting [here](https://mlochbaum.github.io/BQN/editors/index.html).*
+
+# Editor support
+
+<!--GEN
+"style" Enc ".Comment,.Function,.Number,.String { color: inherit; }"
+-->
+
+Editor plugins and other tools for allowing BQN input are in [this folder](https://github.com/mlochbaum/BQN/tree/master/editors). Input is always performed with a backslash `\` prefix by default, using the layout shown [here](https://mlochbaum.github.io/BQN/keymap.html). To type an actual backslash, hit the backslash key twice.
+
+[This bookmarklet](https://abrudz.github.io/lb/bqn) enables BQN input in any webpage in your **browser**.
+
+[This userscript](https://gist.github.com/dzaima/35ca0ce12b5e215a62460f00e693984f) highlights BQN code on **GitHub**.
+
+For **Android**, [this fork](https://github.com/dzaima/hackerskeyboard/releases/latest) adds APL and BQN to Hacker's Keyboard.
+
+The file [inputrc](https://github.com/mlochbaum/BQN/blob/master/editors/inputrc) can be copied or appended to `~/.inputrc` to enable backslash input in **bash**, BQN with **rlwrap**, and other software that uses GNU Readline.
+
+If you'd like to contribute files for another editor I'd gladly accept them!
+
+### XKB
+
+The file [bqn](https://github.com/mlochbaum/BQN/blob/master/editors/bqn) is for configuring XKB on Linux. To use, copy it to `/usr/share/X11/xkb/symbols/`, then run
+
+ $ setxkbmap -layout us,bqn -option grp:switch
+
+replacing `us` with your ordinary keyboard layout. `switch` indicates the right alt key and can be replaced with `lswitch` for left alt or other codes. The setting will go away on shutdown so you will probably want to configure it to run every time you start up. The way to do this depends on your desktop environment. For further discussion, see [Wikipedia](https://en.wikipedia.org/wiki/X_keyboard_extension) or the [APL Wiki](https://aplwiki.com/wiki/Typing_glyphs_on_Linux).
+
+Another XKB option, if you have a compose key enabled, is to place [XCompose](https://github.com/mlochbaum/BQN/blob/master/editors/XCompose) (possibly with adjustments) in `~/.XCompose`.
+
+### Vim
+
+Copy or symlink all files into the corresponding directories in `~/.vim`. Add the following two lines to `~/.vim/filetype.vim`:
+
+ au! BufRead,BufNewFile *.bqn setf bqn
+ au! BufRead,BufNewFile * if getline(1) =~ '^#!.*bqn$' | setf bqn | endif
+
+Include `syntax on` in your .vimrc for syntax highlighting and `filetype plugin on` for keyboard input.
+
+### Emacs
+
+Add the following two lines to `init.el` (usually `~/.emacs.d/init.el`), replacing the path appropriately.
+
+ (add-to-list 'load-path "/path/to/BQN/editors/emacs")
+ (require 'gnu-apl-mode)
+
+### Kakoune
+
+Copy or symlink `kak/autoload/filetype/bqn.kak` into `autoload/filetype` in your Kakoune config directory (probably `.config/kak/`).
diff --git a/editors/README.txt b/editors/README.txt
deleted file mode 100644
index a75d5ad6..00000000
--- a/editors/README.txt
+++ /dev/null
@@ -1,49 +0,0 @@
-Editor plugins and other tools for allowing BQN input. Input is always
-performed with a backslash prefix by default, using the layout
-illustrated at the top of the file ./bqn . To type an actual backslash,
-hit the backslash key twice.
-
-External userscript for highlighting BQN code on GitHub:
-https://gist.github.com/dzaima/35ca0ce12b5e215a62460f00e693984f
-
-The file bqn is for configuring XKB on Linux. To use, copy it
-to /usr/share/X11/xkb/symbols/, then run
-$ setxkbmap -layout us,bqn -option grp:switch
-replacing "us" with your ordinary keyboard layout. "switch" indicates
-the right alt key and can be replaced with "lswitch" for left alt or
-other codes. The setting will go away on shutdown so you will probably
-want to configure it to run every time you start up. The way to do this
-depends on your desktop environment. For further discussion, see:
-- https://en.wikipedia.org/wiki/X_keyboard_extension
-- https://aplwiki.com/wiki/Typing_glyphs_on_Linux
-
-Another XKB option, if you have a compose key enabled, is to place
-XCompose (possibly with adjustments) in ~/.XCompose .
-
-For Android, the following fork adds APL and BQN to Hacker's Keyboard:
-https://github.com/dzaima/hackerskeyboard/releases/latest
-
-The file inputrc can be copied or appended to ~/.inputrc to enable
-backslash input in bash, command-line dzaima/BQN, and other software
-that uses GNU Readline.
-
-For Vim:
-Copy or symlink all files into the corresponding directories in ~/.vim .
-Add the following two lines to ~/.vim/filetype.vim :
- au! BufRead,BufNewFile *.bqn setf bqn
- au! BufRead,BufNewFile * if getline(1) =~ '^#!.*bqn$' | setf bqn | endif
-Include "syntax on" in your .vimrc for syntax highlighting and
-"filetype plugin on" for keyboard input.
-
-For Emacs:
-Add the following two lines to init.el (usually ~/.emacs.d/init.el),
-replacing the path appropriately.
-(add-to-list 'load-path "/path/to/BQN/editors/emacs")
-(require 'gnu-apl-mode)
-
-For Kakoune:
-Copy or symlink kak/autoload/filetype/bqn.kak into autoload/filetype in
-your Kakoune config directory (probably .config/kak/).
-
-If you'd like to contribute files for another editor I'd gladly accept
-them!