From 79bcb4dcb4cbb2c2ce5fe09db1f7a523b1f3451b Mon Sep 17 00:00:00 2001 From: - <@> Date: Wed, 5 Aug 2020 23:36:45 +0300 Subject: Vim status line --- editors/vim/autoload/bqn.txt | 40 ++++++++++++++++++++++++++++++++++++++++ editors/vim/autoload/bqn.vim | 11 +++++++++++ editors/vim/ftplugin/bqn.vim | 2 ++ 3 files changed, 53 insertions(+) create mode 100644 editors/vim/autoload/bqn.txt create mode 100644 editors/vim/autoload/bqn.vim (limited to 'editors/vim') diff --git a/editors/vim/autoload/bqn.txt b/editors/vim/autoload/bqn.txt new file mode 100644 index 00000000..258a81ae --- /dev/null +++ b/editors/vim/autoload/bqn.txt @@ -0,0 +1,40 @@ ++ Conjugate ; Add +- Negate ; Subtract +× Sign ; Multiply +÷ Reciprocal ; Divide +⋆ Exponential ; Power +√ Square Root ; Root +⌊ Floor ; Minimum +⌈ Ceiling ; Maximum +∧ Sort Up ; And* +∨ Sort Down ; Or* +¬ Not* ; Span* +| Absolute Value ; Modulus +≤ ; Less Than or Equal to +< Enclose ; Less Than +> Merge ; Greater Than +≥ ; Greater Than or Equal to += Rank ; Equals +≠ Length ; Not Equals +≡ Depth* ; Match +≢ Shape ; Not Match +⊣ Identity ; Left +⊢ Identity ; Right +⥊ Deshape ; Reshape +∾ Join* ; Join to +≍ Solo* ; Couple* +↑ Prefixes* ; Take +↓ Suffixes* ; Drop +↕ Range ; Windows* +⌽ Reverse ; Rotate +⍉ Transpose* ; Reorder axes* +/ Indices ; Replicate +⍋ Grade Up ; Bins Up +⍒ Grade Down ; Bins Down +⊏ First Cell* ; Select* +⊑ First ; Pick* +⊐ ; Index of +⊒ Occurrence Count* ; Progressive Index of* +∊ Unique Mask ; Member of +⍷ Deduplicate ; Find +⊔ Group Indices* ; Group* diff --git a/editors/vim/autoload/bqn.vim b/editors/vim/autoload/bqn.vim new file mode 100644 index 00000000..b294d93c --- /dev/null +++ b/editors/vim/autoload/bqn.vim @@ -0,0 +1,11 @@ +let s:s=0|let s:f=expand(':p:r').'.txt' +fu bqn#t() "toggle status line + if s:s|let[s:s,s:a,&ls,&stl]=[0,[],s:ls,s:stl]|retu|en + try|let s:a=readfile(s:f)|let g:sa=s:a|cat|let s:a=[]|endt + let[s:s,s:ls,s:stl]=[1,&ls,&stl] + let&ls=2|let&stl='%{bqn#l()}' +endf +fu bqn#l() "render content of status line + let c=substitute(getline('.')[col('.')-1:],'\(\_.\)\_.*','\1','') + for x in s:a|if c=~#x[:len(c)-1]|retu x|en|endfo|retu c +endf diff --git a/editors/vim/ftplugin/bqn.vim b/editors/vim/ftplugin/bqn.vim index 41eb3912..fe4ca541 100644 --- a/editors/vim/ftplugin/bqn.vim +++ b/editors/vim/ftplugin/bqn.vim @@ -6,3 +6,5 @@ setlocal iskeyword=@,48-57,_,^×,^÷ setlocal ignorecase setlocal shiftwidth=2 tabstop=2 softtabstop=2 + +nn :cal bqn#t() -- cgit v1.2.3 From 8ca1c4e5c12af96605f63389a0d988795ba40112 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Wed, 5 Aug 2020 17:52:56 -0400 Subject: Add help for non-function characters --- editors/vim/autoload/bqn.txt | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'editors/vim') diff --git a/editors/vim/autoload/bqn.txt b/editors/vim/autoload/bqn.txt index 258a81ae..66d6cfce 100644 --- a/editors/vim/autoload/bqn.txt +++ b/editors/vim/autoload/bqn.txt @@ -1,3 +1,27 @@ +← Define +↩ Change +→ Return +⋄ Separator +, Separator +: Header separator +; Body separator +( Begin expression +) End expression +{ Begin function or modifier +} End function or modifier +⟨ Begin list +⟩ End list +‿ Strand +· Nothing +𝕨 Left argument +𝕎 Left argument (function) +𝕩 Right argument +𝕏 Right argument (function) +𝕗 Modifier left operand (subject) +𝔽 Modifier left operand +𝕘 2-modifier right operand (subject) +𝔾 2-modifier right operand +# Comment + Conjugate ; Add - Negate ; Subtract × Sign ; Multiply @@ -38,3 +62,22 @@ ∊ Unique Mask ; Member of ⍷ Deduplicate ; Find ⊔ Group Indices* ; Group* +! Assert ; Assert with message +˜ Self/Swap {𝕩𝔽𝕨⊣𝕩} +∘ Atop {𝔽𝕨𝔾𝕩} +○ Over {(𝔾𝕨)𝔽𝔾𝕩} +⊸ Before/Bind {(𝔽𝕨⊣𝕩)𝔾𝕩} +⟜ After/Bind {(𝕨⊣𝕩)𝔽𝔾𝕩} +⌾ Under {𝔾⁼∘𝔽○𝔾} OR {(𝔾𝕩)↩𝕨𝔽○𝔾𝕩⋄𝕩} +⊘ Valences {𝔽𝕩;𝕨𝔾𝕩} +◶ Choose {f←(𝕨𝔽𝕩)⊑𝕘 ⋄ 𝕨F𝕩} +˘ Cells +⎉ Rank +¨ Each +⚇ Depth +⌜ Table +⁼ Undo +⍟ Repeat +´ Fold +˝ Insert +` Scan -- cgit v1.2.3