Skip to content

Commit d2855f5

Browse files
committed
Update runtime files.
1 parent 79c2ad5 commit d2855f5

11 files changed

Lines changed: 227 additions & 92 deletions

File tree

runtime/doc/if_perl.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ The Perl patches for Vim were made by:
4444
Sven Verdoolaege <[email protected]>
4545
Matt Gerassimof
4646

47-
Perl for MS-Windows can be found at: http://www.perl.com/
48-
The ActiveState one should work.
47+
Perl for MS-Windows (and other platforms) can be found at:
48+
http://www.perl.org/ The ActiveState one should work, Strawberry Perl is a
49+
good alternative.
4950

5051
==============================================================================
5152
3. Using the Perl interface *perl-using*

runtime/doc/todo.txt

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ browser use: https://github.com/vim/vim/issues/1234
3838
*known-bugs*
3939
-------------------- Known bugs and current work -----------------------
4040

41+
Graduate FEAT_VREPLACE, it's not much code and a lot of #ifdefs
42+
4143
Prompt buffer:
4244
- Add a command line history.
4345
- delay next prompt until plugin gives OK?
@@ -102,10 +104,6 @@ Pelle, 2018 Jul 22, #3239) Also see 8.0.0722. Check both console and GUI.
102104
More warnings from static analysis:
103105
https://lgtm.com/projects/g/vim/vim/alerts/?mode=list
104106

105-
When handle_drop() is called while the updating_screen is true, it fails
106-
completely. Should store the file list and use it when updating_screen is set
107-
to false in reset_updating_screen().
108-
109107
Pasting foo} causes Vim to behave weird. (John Little, 2018 Jun 17)
110108
Related to bracketed paste. I cannot reproduce it.
111109

@@ -155,9 +153,6 @@ gethostbyname() is old, use getaddrinfo() if available. (#3227)
155153
matchaddpos() gets slow with many matches. Proposal by Rick Howe, 2018 Jul
156154
19.
157155

158-
Patch to make mode() return something different for Normal mode when coming
159-
from Insert mode with CTRL-O. (#3000) Useful for positioning the cursor.
160-
161156
Script generated by :mksession does not work well if there are windows with
162157
modified buffers
163158
change "silent only" into "silent only!"
@@ -167,6 +162,9 @@ modified buffers
167162

168163
Patch to make :help work for tags with a ?. (Hirohito Higashi, 2018 May 28)
169164

165+
Patch to have a stack trace in Ruby. (Masataka Pocke Kuwabara, 2018 Jul 30,
166+
#3267)
167+
170168
Patch to adjust to DPI setting for GTK. (Roel van de Kraats, 2017 Nov 20,
171169
#2357)
172170

runtime/doc/various.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,4 +729,4 @@ LessInitFunc in your vimrc, for example: >
729729
endfunc
730730
<
731731

732-
vim:tw=78:ts=8:ft=help:norl:
732+
vim:tw=78:ts=8:noet:ft=help:norl:

runtime/filetype.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1766,6 +1766,9 @@ au BufNewFile,BufRead *.vroom setf vroom
17661766
" Webmacro
17671767
au BufNewFile,BufRead *.wm setf webmacro
17681768

1769+
" WebAssembly
1770+
au BufNewFile,BufRead *.wast,*.wat setf wast
1771+
17691772
" Wget config
17701773
au BufNewFile,BufRead .wgetrc,wgetrc setf wget
17711774

runtime/ftplugin/wast.vim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
" Vim filetype plugin file
2+
" Language: WebAssembly
3+
" Maintainer: rhysd <[email protected]>
4+
" Last Change: Jul 29, 2018
5+
" For bugs, patches and license go to https://github.com/rhysd/vim-wasm
6+
7+
if exists("b:did_ftplugin")
8+
finish
9+
endif
10+
let b:did_ftplugin = 1
11+
12+
setlocal comments=s:(;,e:;),:;;
13+
setlocal commentstring=(;%s;)
14+
setlocal formatoptions-=t
15+
setlocal iskeyword+=$,.,/
16+
17+
let b:undo_ftplugin = "setlocal comments< commentstring< formatoptions< iskeyword<"

runtime/indent/wast.vim

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
" Vim indent file
2+
" Language: WebAssembly
3+
" Maintainer: rhysd <[email protected]>
4+
" Last Change: Jul 29, 2018
5+
" For bugs, patches and license go to https://github.com/rhysd/vim-wasm
6+
7+
if exists("b:did_indent")
8+
finish
9+
endif
10+
let b:did_indent = 1
11+
12+
" WebAssembly text format is S-expression. We can reuse LISP indentation
13+
" logic.
14+
setlocal indentexpr=lispindent('.')
15+
setlocal noautoindent nosmartindent
16+
17+
let b:undo_indent = "setl lisp< indentexpr<"

runtime/syntax/sh.vim

Lines changed: 44 additions & 33 deletions
Large diffs are not rendered by default.

runtime/syntax/vim.vim

Lines changed: 46 additions & 42 deletions
Large diffs are not rendered by default.

runtime/syntax/wast.vim

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
" Vim syntax file
2+
" Language: WebAssembly
3+
" Maintainer: rhysd <[email protected]>
4+
" Last Change: Jul 29, 2018
5+
" For bugs, patches and license go to https://github.com/rhysd/vim-wasm
6+
7+
if exists("b:current_syntax")
8+
finish
9+
endif
10+
11+
let s:cpo_save = &cpo
12+
set cpo&vim
13+
14+
syn cluster wastCluster contains=wastModule,wastInstWithType,wastInstGeneral,wastParamInst,wastControlInst,wastString,wastNamedVar,wastUnnamedVar,wastFloat,wastNumber,wastComment,wastList,wastType
15+
16+
" Instructions
17+
" https://webassembly.github.io/spec/core/text/instructions.html
18+
" Note: memarg (align=,offset=) can be added to memory instructions
19+
syn match wastInstWithType "\%((\s*\)\@<=\<\%(i32\|i64\|f32\|f64\|memory\)\.[[:alnum:]_]\+\%(/\%(i32\|i64\|f32\|f64\)\)\=\>\%(\s\+\%(align\|offset\)=\)\=" contained display
20+
syn match wastInstGeneral "\%((\s*\)\@<=\<[[:alnum:]_]\+\>" contained display
21+
" https://webassembly.github.io/spec/core/text/instructions.html#control-instructions
22+
syn match wastControlInst "\%((\s*\)\@<=\<\%(block\|end\|loop\|if\|else\|unreachable\|nop\|br\|br_if\|br_table\|return\|call\|call_indirect\)\>" contained display
23+
" https://webassembly.github.io/spec/core/text/instructions.html#parametric-instructions
24+
syn match wastParamInst "\%((\s*\)\@<=\<\%(drop\|select\)\>" contained display
25+
26+
" Identifiers
27+
" https://webassembly.github.io/spec/core/text/values.html#text-id
28+
syn match wastNamedVar "$\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]*" contained display
29+
syn match wastUnnamedVar "$\+\d\+[[:alnum:]!#$%&'∗./:=><?@\\^_`~+-]\@!" contained display
30+
31+
" String literals
32+
" https://webassembly.github.io/spec/core/text/values.html#strings
33+
syn region wastString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained contains=wastStringSpecial
34+
syn match wastStringSpecial "\\\x\x\|\\[tnr'\\\"]\|\\u\x\+" contained containedin=wastString
35+
36+
" Float literals
37+
" https://webassembly.github.io/spec/core/text/values.html#floating-point
38+
syn match wastFloat "\<-\=\d\%(_\=\d\)*\%(\.\d\%(_\=\d\)*\)\=\%([eE][-+]\=\d\%(_\=\d\)*\)\=" display contained
39+
syn match wastFloat "\<-\=0x\x\%(_\=\d\)*\%(\.\x\%(_\=\x\)*\)\=\%([pP][-+]\=\d\%(_\=\d\)*\)\=" display contained
40+
syn keyword wastFloat inf nan contained
41+
42+
" Integer literals
43+
" https://webassembly.github.io/spec/core/text/values.html#integers
44+
syn match wastNumber "\<-\=\d\%(_\=\d\)*\>" display contained
45+
syn match wastNumber "\<-\=0x\x\%(_\=\x\)*\>" display contained
46+
47+
" Comments
48+
" https://webassembly.github.io/spec/core/text/lexical.html#comments
49+
syn region wastComment start=";;" end="$" display
50+
syn region wastComment start="(;;\@!" end=";)"
51+
52+
syn region wastList matchgroup=wastListDelimiter start="(;\@!" matchgroup=wastListDelimiter end=";\@<!)" contains=@wastCluster
53+
54+
" Types
55+
" https://webassembly.github.io/spec/core/text/types.html
56+
syn keyword wastType i64 i32 f64 f32 param result anyfunc mut contained
57+
syn match wastType "\%((\_s*\)\@<=func\%(\_s*[()]\)\@=" display contained
58+
59+
" Modules
60+
" https://webassembly.github.io/spec/core/text/modules.html
61+
syn keyword wastModule module type export import table memory global data elem contained
62+
syn match wastModule "\%((\_s*\)\@<=func\%(\_s\+\$\)\@=" display contained
63+
64+
syn sync lines=100
65+
66+
hi def link wastModule PreProc
67+
hi def link wastListDelimiter Delimiter
68+
hi def link wastInstWithType Operator
69+
hi def link wastInstGeneral Operator
70+
hi def link wastControlInst Statement
71+
hi def link wastParamInst Conditional
72+
hi def link wastString String
73+
hi def link wastStringSpecial Special
74+
hi def link wastNamedVar Identifier
75+
hi def link wastUnnamedVar PreProc
76+
hi def link wastFloat Float
77+
hi def link wastNumber Number
78+
hi def link wastComment Comment
79+
hi def link wastType Type
80+
81+
let b:current_syntax = "wast"
82+
83+
let &cpo = s:cpo_save
84+
unlet s:cpo_save

runtime/tutor/tutor.it

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
I comandi nelle lezioni modificano questo testo. Fai una copia di questo
1515
file per esercitarti (se hai usato "vimtutor", stai gi� usando una copia).
1616

17-
E' importante non scordare che questa guida vuole insegnare tramite
17+
importante non scordare che questa guida vuole insegnare tramite
1818
l'uso. Questo vuol dire che devi eseguire i comandi per impararli
1919
davvero. Se leggi il testo e basta, dimenticherai presto i comandi!
2020

@@ -406,7 +406,7 @@ NOTA: Se batti solo il movimento mentre sei in Modalit
406406
---> Ammattendo quetta lince, qualcuno ho predato alcuni tosti sballiati!
407407
---> Immettendo questa linea, qualcuno ha premuto alcuni tasti sbagliati!
408408

409-
5. Ora passa alla Lezione 3.2.
409+
5. Ora passa alla Lezione 3.3.
410410

411411
NOTA: Ricordati che dovresti imparare con la pratica, non solo leggendo.
412412

@@ -956,7 +956,7 @@ NOTA: Il completamento
956956
Quest'altro libro � pi� su Vi che su Vim, ma � pure consigliato:
957957
Learning the Vi Editor - di Linda Lamb e Arnold Robbins
958958
Editore: O'Reilly & Associates Inc.
959-
E' un buon libro per imparare quasi tutto ci� che puoi voler fare con Vi.
959+
un buon libro per imparare quasi tutto ci� che puoi voler fare con Vi.
960960
Ne esiste una traduzione italiana, basata su una vecchia edizione.
961961

962962
Questa guida � stata scritta da Michael C. Pierce e Robert K. Ware,

0 commit comments

Comments
 (0)