aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-02 12:45:09 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-02 12:53:49 -0400
commit3bc852cabf5326079c710c772d5e925f3b151c3a (patch)
treed18aae5e5541374596a3f2f9a053966009dbbe2b /runtime/doc
parent7e36c9a2d3ddcb8b31e318e25767cfb32fa69391 (diff)
downloadrneovim-3bc852cabf5326079c710c772d5e925f3b151c3a.tar.gz
rneovim-3bc852cabf5326079c710c772d5e925f3b151c3a.tar.bz2
rneovim-3bc852cabf5326079c710c772d5e925f3b151c3a.zip
vim-patch:11e3c5ba8203
Update runtime files https://github.com/vim/vim/commit/11e3c5ba820325b69cb56f70e13c21d7b8808d33
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/ft_raku.txt126
-rw-r--r--runtime/doc/usr_12.txt4
-rw-r--r--runtime/doc/usr_41.txt20
3 files changed, 142 insertions, 8 deletions
diff --git a/runtime/doc/ft_raku.txt b/runtime/doc/ft_raku.txt
new file mode 100644
index 0000000000..26ada8a140
--- /dev/null
+++ b/runtime/doc/ft_raku.txt
@@ -0,0 +1,126 @@
+*vim-raku.txt* The Raku programming language filetype
+
+ *vim-raku*
+
+Vim-raku provides syntax highlighting, indentation, and other support for
+editing Raku programs.
+
+1. Using Unicode in your Raku files |raku-unicode|
+
+==============================================================================
+1. Using Unicode in your Raku files *raku-unicode*
+
+Defining new operators using Unicode symbols is a good way to make your
+Raku program easy to read. See:
+https://perl6advent.wordpress.com/2012/12/18/day-18-formulas-resistance-is-futile/
+
+While Raku does define ASCII alternatives for some common operators (see
+https://docs.raku.org/language/unicode_ascii), using the full range of
+Unicode operators is highly desirable. Your operating system provides input
+facilities, but using the features built in to Vim may be preferable.
+
+The natural way to produce these symbols in Vim is to use digraph shortcuts
+(:help |digraphs-use|). Many of them are defined; type `:digraphs` to get
+the list. A convenient way to read the list of digraphs is to save them in a
+file. From the shell: >
+ vim +'redir >/tmp/vim-digraphs-listing.txt' +digraphs +'redir END' +q
+
+Some of them are available with standard Vim digraphs:
+ << « /0 ∅ !< ≮ ~
+ >> » Ob ∘ !> ≯ ~
+ ., … 00 ∞ (C ⊂ ~
+ (U ∩ -: ÷ )C ⊃ ~
+ )U ∪ (_ ⊆ >= ≥ ~
+ ?= ≅ )_ ⊇ =< ≤ ~
+ (- ∈ ?= ≅ != ≠ ~
+ -) ∋ ?- ≃ ~
+
+The Greek alphabet is available with '*' followed by a similar Latin symbol:
+ *p π ~
+ *t τ ~
+ *X × ~
+
+Numbers, subscripts and superscripts are available with 's' and 'S':
+ 0s ₀ 0S ⁰ ~
+ 1s ₁ 1S ¹ ~
+ 2s ₂ 9S ⁹ ~
+
+But some don´t come defined by default. Those are digraph definitions you can
+add in your ~/.vimrc file. >
+ exec 'digraph \\ '.char2nr('∖')
+ exec 'digraph \< '.char2nr('≼')
+ exec 'digraph \> '.char2nr('≽')
+ exec 'digraph (L '.char2nr('⊈')
+ exec 'digraph )L '.char2nr('⊉')
+ exec 'digraph (/ '.char2nr('⊄')
+ exec 'digraph )/ '.char2nr('⊅')
+ exec 'digraph )/ '.char2nr('⊅')
+ exec 'digraph U+ '.char2nr('⊎')
+ exec 'digraph 0- '.char2nr('⊖')
+ " Euler's constant
+ exec 'digraph ne '.char2nr('𝑒')
+ " Raku's atomic operations marker
+ exec 'digraph @@ '.char2nr('⚛')
+
+Alternatively, you can write Insert mode abbreviations that convert ASCII-
+based operators into their single-character Unicode equivalent. >
+ iabbrev <buffer> !(<) ⊄
+ iabbrev <buffer> !(<=) ⊈
+ iabbrev <buffer> !(>) ⊅
+ iabbrev <buffer> !(>=) ⊉
+ iabbrev <buffer> !(cont) ∌
+ iabbrev <buffer> !(elem) ∉
+ iabbrev <buffer> != ≠
+ iabbrev <buffer> (&) ∩
+ iabbrev <buffer> (+) ⊎
+ iabbrev <buffer> (-) ∖
+ iabbrev <buffer> (.) ⊍
+ iabbrev <buffer> (<) ⊂
+ iabbrev <buffer> (<+) ≼
+ iabbrev <buffer> (<=) ⊆
+ iabbrev <buffer> (>) ⊃
+ iabbrev <buffer> (>+) ≽
+ iabbrev <buffer> (>=) ⊇
+ iabbrev <buffer> (\|) ∪
+ iabbrev <buffer> (^) ⊖
+ iabbrev <buffer> (atomic) ⚛
+ iabbrev <buffer> (cont) ∋
+ iabbrev <buffer> (elem) ∈
+ iabbrev <buffer> * ×
+ iabbrev <buffer> **0 ⁰
+ iabbrev <buffer> **1 ¹
+ iabbrev <buffer> **2 ²
+ iabbrev <buffer> **3 ³
+ iabbrev <buffer> **4 ⁴
+ iabbrev <buffer> **5 ⁵
+ iabbrev <buffer> **6 ⁶
+ iabbrev <buffer> **7 ⁷
+ iabbrev <buffer> **8 ⁸
+ iabbrev <buffer> **9 ⁹
+ iabbrev <buffer> ... …
+ iabbrev <buffer> / ÷
+ iabbrev <buffer> << «
+ iabbrev <buffer> <<[=]<< «=«
+ iabbrev <buffer> <<[=]>> «=»
+ iabbrev <buffer> <= ≤
+ iabbrev <buffer> =~= ≅
+ iabbrev <buffer> >= ≥
+ iabbrev <buffer> >> »
+ iabbrev <buffer> >>[=]<< »=«
+ iabbrev <buffer> >>[=]>> »=»
+ iabbrev <buffer> Inf ∞
+ iabbrev <buffer> atomic-add-fetch ⚛+=
+ iabbrev <buffer> atomic-assign ⚛=
+ iabbrev <buffer> atomic-fetch ⚛
+ iabbrev <buffer> atomic-dec-fetch --⚛
+ iabbrev <buffer> atomic-fetch-dec ⚛--
+ iabbrev <buffer> atomic-fetch-inc ⚛++
+ iabbrev <buffer> atomic-inc-fetch ++⚛
+ iabbrev <buffer> atomic-sub-fetch ⚛−=
+ iabbrev <buffer> e 𝑒
+ iabbrev <buffer> o ∘
+ iabbrev <buffer> pi π
+ iabbrev <buffer> set() ∅
+ iabbrev <buffer> tau τ
+<
+ vim:tw=78:ts=8:noet:ft=help:norl:
diff --git a/runtime/doc/usr_12.txt b/runtime/doc/usr_12.txt
index 21efa36a25..51a25b1593 100644
--- a/runtime/doc/usr_12.txt
+++ b/runtime/doc/usr_12.txt
@@ -180,14 +180,14 @@ after it. That way you don't have this problem again.
The |:global| command can be combined with the |:move| command to move all the
lines before the first line, resulting in a reversed file. The command is: >
- :global/^/m 0
+ :global/^/move 0
Abbreviated: >
:g/^/m 0
The "^" regular expression matches the beginning of the line (even if the line
-is blank). The |:move| command moves the matching line to after the mythical
+is blank). The |:move| command moves the matching line to after the imaginary
zeroth line, so the current matching line becomes the first line of the file.
As the |:global| command is not confused by the changing line numbering,
|:global| proceeds to match all remaining lines of the file and puts each as
diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt
index 081b3ece1c..4cba5a33d0 100644
--- a/runtime/doc/usr_41.txt
+++ b/runtime/doc/usr_41.txt
@@ -115,12 +115,20 @@ if you are impatient.
FOUR KINDS OF NUMBERS
-Numbers can be decimal, hexadecimal, octal or binary. A hexadecimal number
-starts with "0x" or "0X". For example "0x1f" is decimal 31. An octal number
-starts with a zero. "017" is decimal 15. A binary number starts with "0b" or
-"0B". For example "0b101" is decimal 5. Careful: don't put a zero before a
-decimal number, it will be interpreted as an octal number!
- The ":echo" command always prints decimal numbers. Example: >
+Numbers can be decimal, hexadecimal, octal or binary.
+
+A hexadecimal number starts with "0x" or "0X". For example "0x1f" is decimal
+31.
+
+An octal number starts with "0o", "0O" or a zero and another digit. "0o17" is
+decimal 15. Using just a zero prefix is not supported in Vim9 script.
+
+A binary number starts with "0b" or "0B". For example "0b101" is decimal 5.
+
+A decimal number is just digits. Careful: don't put a zero before a decimal
+number, it will be interpreted as an octal number in legacy script!
+
+The ":echo" command always prints decimal numbers. Example: >
:echo 0x7f 0o36
< 127 30 ~