annotate runtime/doc/ft_raku.txt @ 24520:5bda4653aced

Update runtime files Commit: https://github.com/vim/vim/commit/11e3c5ba820325b69cb56f70e13c21d7b8808d33 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Apr 21 18:09:37 2021 +0200 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Wed, 21 Apr 2021 18:15:04 +0200
parents
children fd37be6dc258
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24520
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 *vim-raku.txt* The Raku programming language filetype
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 *vim-raku*
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 Vim-raku provides syntax highlighting, indentation, and other support for
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 editing Raku programs.
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 1. Using Unicode in your Raku files |raku-unicode|
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 ==============================================================================
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 1. Using Unicode in your Raku files *raku-unicode*
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 Defining new operators using Unicode symbols is a good way to make your
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 Raku program easy to read. See:
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 https://perl6advent.wordpress.com/2012/12/18/day-18-formulas-resistance-is-futile/
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
17 While Raku does define ASCII alternatives for some common operators (see
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 https://docs.raku.org/language/unicode_ascii), using the full range of
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 Unicode operators is highly desirable. Your operating system provides input
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 facilities, but using the features built in to Vim may be preferable.
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
21
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 The natural way to produce these symbols in Vim is to use digraph shortcuts
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 (:help |digraphs-use|). Many of them are defined; type `:digraphs` to get
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
24 the list. A convenient way to read the list of digraphs is to save them in a
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 file. From the shell: >
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 vim +'redir >/tmp/vim-digraphs-listing.txt' +digraphs +'redir END' +q
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 Some of them are available with standard Vim digraphs:
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 << « /0 ∅ !< ≮ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 >> » Ob ∘ !> ≯ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 ., … 00 ∞ (C ⊂ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 (U ∩ -: ÷ )C ⊃ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 )U ∪ (_ ⊆ >= ≥ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34 ?= ≅ )_ ⊇ =< ≤ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 (- ∈ ?= ≅ != ≠ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 -) ∋ ?- ≃ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 The Greek alphabet is available with '*' followed by a similar Latin symbol:
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 *p π ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 *t τ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 *X × ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43 Numbers, subscripts and superscripts are available with 's' and 'S':
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 0s ₀ 0S ⁰ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 1s ₁ 1S ¹ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 2s ₂ 9S ⁹ ~
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 But some don´t come defined by default. Those are digraph definitions you can
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 add in your ~/.vimrc file. >
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 exec 'digraph \\ '.char2nr('∖')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51 exec 'digraph \< '.char2nr('≼')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 exec 'digraph \> '.char2nr('≽')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 exec 'digraph (L '.char2nr('⊈')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 exec 'digraph )L '.char2nr('⊉')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 exec 'digraph (/ '.char2nr('⊄')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 exec 'digraph )/ '.char2nr('⊅')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 exec 'digraph )/ '.char2nr('⊅')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 exec 'digraph U+ '.char2nr('⊎')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 exec 'digraph 0- '.char2nr('⊖')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 " Euler's constant
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 exec 'digraph ne '.char2nr('𝑒')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 " Raku's atomic operations marker
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 exec 'digraph @@ '.char2nr('⚛')
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 Alternatively, you can write Insert mode abbreviations that convert ASCII-
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 based operators into their single-character Unicode equivalent. >
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 iabbrev <buffer> !(<) ⊄
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 iabbrev <buffer> !(<=) ⊈
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 iabbrev <buffer> !(>) ⊅
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 iabbrev <buffer> !(>=) ⊉
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 iabbrev <buffer> !(cont) ∌
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 iabbrev <buffer> !(elem) ∉
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73 iabbrev <buffer> != ≠
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 iabbrev <buffer> (&) ∩
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 iabbrev <buffer> (+) ⊎
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 iabbrev <buffer> (-) ∖
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 iabbrev <buffer> (.) ⊍
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 iabbrev <buffer> (<) ⊂
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 iabbrev <buffer> (<+) ≼
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 iabbrev <buffer> (<=) ⊆
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 iabbrev <buffer> (>) ⊃
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 iabbrev <buffer> (>+) ≽
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 iabbrev <buffer> (>=) ⊇
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84 iabbrev <buffer> (\|) ∪
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 iabbrev <buffer> (^) ⊖
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 iabbrev <buffer> (atomic) ⚛
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 iabbrev <buffer> (cont) ∋
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 iabbrev <buffer> (elem) ∈
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 iabbrev <buffer> * ×
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90 iabbrev <buffer> **0 ⁰
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91 iabbrev <buffer> **1 ¹
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92 iabbrev <buffer> **2 ²
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
93 iabbrev <buffer> **3 ³
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94 iabbrev <buffer> **4 ⁴
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95 iabbrev <buffer> **5 ⁵
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
96 iabbrev <buffer> **6 ⁶
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
97 iabbrev <buffer> **7 ⁷
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
98 iabbrev <buffer> **8 ⁸
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
99 iabbrev <buffer> **9 ⁹
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
100 iabbrev <buffer> ... …
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
101 iabbrev <buffer> / ÷
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
102 iabbrev <buffer> << «
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
103 iabbrev <buffer> <<[=]<< «=«
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
104 iabbrev <buffer> <<[=]>> «=»
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
105 iabbrev <buffer> <= ≤
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
106 iabbrev <buffer> =~= ≅
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
107 iabbrev <buffer> >= ≥
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
108 iabbrev <buffer> >> »
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
109 iabbrev <buffer> >>[=]<< »=«
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110 iabbrev <buffer> >>[=]>> »=»
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111 iabbrev <buffer> Inf ∞
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112 iabbrev <buffer> atomic-add-fetch ⚛+=
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113 iabbrev <buffer> atomic-assign ⚛=
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
114 iabbrev <buffer> atomic-fetch ⚛
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
115 iabbrev <buffer> atomic-dec-fetch --⚛
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
116 iabbrev <buffer> atomic-fetch-dec ⚛--
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
117 iabbrev <buffer> atomic-fetch-inc ⚛++
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
118 iabbrev <buffer> atomic-inc-fetch ++⚛
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
119 iabbrev <buffer> atomic-sub-fetch ⚛−=
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
120 iabbrev <buffer> e 𝑒
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
121 iabbrev <buffer> o ∘
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
122 iabbrev <buffer> pi π
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
123 iabbrev <buffer> set() ∅
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
124 iabbrev <buffer> tau τ
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
125 <
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
126 vim:tw=78:ts=8:noet:ft=help:norl: