annotate runtime/doc/ft_raku.txt @ 32721:94f4a488412e v9.0.1683

Updated runtime files Commit: https://github.com/vim/vim/commit/6efb1980336ff324e9c57a4e282530b952fca816 Author: Christian Brabandt <cb@256bit.org> Date: Thu Aug 10 05:44:25 2023 +0200 Updated runtime files This is a collection of various PRs from github that all require a minor patch number: 1) https://github.com/vim/vim/pull/12612 Do not conflate dictionary key with end of block 2) https://github.com/vim/vim/pull/12729: When saving and restoring 'undolevels', the constructs `&undolevels` and `:set undolevels` are problematic. The construct `&undolevels` reads an unpredictable value; it will be the local option value (if one has been set), or the global option value (otherwise), making it unsuitable for saving a value for later restoration. Similarly, if a local option value has been set for 'undolevels', temporarily modifying the option via `:set undolevels` changes the local value as well as the global value, requiring extra work to restore both values. Saving and restoring the option value in one step via the construct `:let &undolevels = &undolevels` appears to make no changes to the 'undolevels' option, but if a local option has been set to a different value than the global option, it has the unintended effect of changing the global 'undolevels' value to the local value. Update the documentation to explain these issues and recommend explicit use of global and local option values when saving and restoring. Update some unit tests to use `g:undolevels`. 3) https://github.com/vim/vim/pull/12702: Problem: Pip requirements files are not recognized. Solution: Add a pattern to match pip requirements files. 4) https://github.com/vim/vim/pull/12688: Add indent file and tests for ABB Rapid 5) https://github.com/vim/vim/pull/12668: Use Lua 5.1 numeric escapes in tests and add to CI Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings. Lua 5.1 only supports decimal escapes: > A character in a string can also be specified by its numerical value > using the escape sequence \ddd, where ddd is a sequence of up to three > decimal digits. (Note that if a numerical escape is to be followed by a > digit, it must be expressed using exactly three digits.) Strings in Lua > can contain any 8-bit value, including embedded zeros, which can be > specified as '\0'. To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to run with Lua 5.1 as well as Lua 5.4 6) https://github.com/vim/vim/pull/12631: Add hurl filetype detection 7) https://github.com/vim/vim/pull/12573: Problem: Files for haskell persistent library are not recognized Solution: Add pattern persistentmodels for haskell persistent library closes: #12612 closes: #12729 closes: #12702 closes: #12688 closes: #12668 closes: #12631 closes: #12573 Co-authored-by: lacygoill <lacygoill@lacygoill.me> Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com> Co-authored-by: ObserverOfTime <chronobserver@disroot.org> Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de> Co-authored-by: James McCoy <jamessan@jamessan.com> Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev> Co-authored-by: Borys Lykah <lykahb@fastmail.com>
author Christian Brabandt <cb@256bit.org>
date Thu, 10 Aug 2023 06:30:06 +0200
parents d19b7aee1925
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
25056
43593a5d873f Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24911
diff changeset
1 *ft_raku.txt* The Raku programming language filetype
24520
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
24911
fd37be6dc258 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 24520
diff changeset
48 But some don't come defined by default. Those are digraph definitions you can
24520
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 add in your ~/.vimrc file. >
27903
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
50 exec 'digraph \\ ' .. char2nr('∖')
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
51 exec 'digraph \< ' .. char2nr('≼')
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
52 exec 'digraph \> ' .. char2nr('≽')
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
53 exec 'digraph (L ' .. char2nr('⊈')
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
54 exec 'digraph )L ' .. char2nr('⊉')
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
55 exec 'digraph (/ ' .. char2nr('⊄')
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
56 exec 'digraph )/ ' .. char2nr('⊅')
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
57 exec 'digraph )/ ' .. char2nr('⊅')
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
58 exec 'digraph U+ ' .. char2nr('⊎')
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
59 exec 'digraph 0- ' .. char2nr('⊖')
24520
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 " Euler's constant
27903
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
61 exec 'digraph ne ' .. char2nr('𝑒')
24520
5bda4653aced Update runtime files
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62 " Raku's atomic operations marker
27903
d19b7aee1925 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 25056
diff changeset
63 exec 'digraph @@ ' .. char2nr('⚛')
24520
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: