diff options
| author | - <@> | 2020-08-05 23:36:45 +0300 |
|---|---|---|
| committer | - <@> | 2020-08-05 23:36:45 +0300 |
| commit | 79bcb4dcb4cbb2c2ce5fe09db1f7a523b1f3451b (patch) | |
| tree | 2a1b47250e9ed4a0c6055194414648f06ffdcec7 /editors/vim | |
| parent | 261bc816ea1635051bc367097c3952058543a4f5 (diff) | |
Vim status line
Diffstat (limited to 'editors/vim')
| -rw-r--r-- | editors/vim/autoload/bqn.txt | 40 | ||||
| -rw-r--r-- | editors/vim/autoload/bqn.vim | 11 | ||||
| -rw-r--r-- | editors/vim/ftplugin/bqn.vim | 2 |
3 files changed, 53 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 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<buffer><f1> :cal bqn#t()<cr> |
