aboutsummaryrefslogtreecommitdiff
path: root/editors/vim/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'editors/vim/autoload')
-rw-r--r--editors/vim/autoload/bqn.txt40
-rw-r--r--editors/vim/autoload/bqn.vim11
2 files changed, 51 insertions, 0 deletions
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('<sfile>: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