-
Notifications
You must be signed in to change notification settings - Fork 619
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3930 from masatake/vim--vim9
Vim: support vim9script
- Loading branch information
Showing
13 changed files
with
177 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--sort=no | ||
--fields=+t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
s:CONSTANT input.vim /^const s:CONSTANT = 42$/;" C | ||
matches input-0.vim /^final matches = []$/;" C | ||
names input-0.vim /^const names = ['Betty', 'Peter']$/;" C | ||
LINK input-0.vim /^const LINK: string = '->'$/;" C typeref:typename:string | ||
mylist input-0.vim /^final mylist: list<string> = ['foo']$/;" C typeref:typename:list<string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
vim9script | ||
|
||
# Taken from https://vim-jp.org/vimdoc-ja/vim9.html#vim9-differences | ||
final matches = [] | ||
const names = ['Betty', 'Peter'] | ||
|
||
const LINK: string = '->' | ||
|
||
# Taken from ~/var/vim/runtime/doc/vim9.txt | ||
final mylist: list<string> = ['foo'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--sort=no | ||
--fields=+tS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Func input.vim /^def Func()$/;" f | ||
Func input.vim /^def Func()$/;" f signature:() | ||
Func2 input.vim /^def Func2(): number$/;" f typeref:typename:number signature:() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
def Func() | ||
enddef | ||
|
||
vim9script | ||
def Func2(): number | ||
return 0 | ||
enddef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--sort=no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
EXPORTED_CONST input.vim /^export const EXPORTED_CONST = 1234$/;" C | ||
v input.vim /^export var v = 1$/;" v | ||
f input.vim /^export final f = 2$/;" C | ||
c input.vim /^export const c = 3$/;" C | ||
MyFunc input.vim /^export def MyFunc()$/;" f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
vim9script | ||
|
||
export const EXPORTED_CONST = 1234 | ||
export var v = 1 | ||
export final f = 2 | ||
export const c = 3 | ||
export def MyFunc() | ||
echo "hello" | ||
enddef | ||
|
||
# export class MyClass ... | ||
# export interface MyClass ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--sort=no | ||
--fields=+St |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
cur_menu_name input.vim /^var cur_menu_name = ""$/;" v | ||
cur_menu_nr input.vim /^var cur_menu_nr = 0$/;" v | ||
cur_menu_item input.vim /^var cur_menu_item: number = 0$/;" v typeref:typename:number | ||
cur_menu_char input.vim /^var cur_menu_char = ""$/;" v | ||
language_section input.vim /^var language_section: list<string> =<< trim END$/;" v typeref:typename:list<string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
vim9script | ||
|
||
# Taken from vim/runtime/makemenu.vim | ||
|
||
var cur_menu_name = "" | ||
var cur_menu_nr = 0 | ||
var cur_menu_item: number = 0 | ||
var cur_menu_char = "" | ||
|
||
# Taken from vim/runtime/import/dist/vimhighlight.vim | ||
|
||
var language_section: list<string> =<< trim END | ||
|
||
Highlighting groups for language syntaxes | ||
----------------------------------------- | ||
|
||
END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters