annotate runtime/doc/ft_raku.txt @ 35257:008e5022f187

runtime(i3config/swayconfig): support floating_modifier none; revert broken highlighting Commit: https://github.com/vim/vim/commit/22ac941208fcb2c63ad172c6cf0b39b077b5b682 Author: James Eapen <james.eapen@vai.org> Date: Thu May 23 20:47:49 2024 +0200 runtime(i3config/swayconfig): support floating_modifier none; revert broken highlighting - fix floating_modifier $mod normal|inverse was being hightlighted as error reverting the floating_modifier change from dd83b63 - will currently allow invalid syntax after floating_modifier fixes: #14826 closes: #14827 Co-authored-by: JosefLitos <litosjos@fit.cvut.cz> Signed-off-by: James Eapen <james.eapen@vai.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 23 May 2024 21:00:03 +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: