1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-01-25 09:10:03 +08:00
SpaceVim/test/api/data/string.vader
Wang Shidong ecab6eb52b
Fix flygerp support in windows (#2371)
* Fix flygerp support in windows

* Fix path

* Add option for config command line prompt

Add new SpaceVim option commandline_prompt, this option is for
changging denite and flygrep command line prompt, by default it is
➭

* Remove spacevim before prompt

* Add getjumplist compatible function

* Update getjumplist function

* Implement split max func

* Update test

* Fix compatible function

* Fix rg support in flygrep_windows

in window and neovim-qt, rg need a '.' at the end if no dir specific

* Fix ag support

* Update wiki

* Update notes

* Add note for install rg and ag in windows
2018-12-22 22:18:19 +08:00

14 lines
869 B
Plaintext

Execute ( SpaceVim api: data#string ):
let str = SpaceVim#api#import('data#string')
AssertEqual str.split(' 20 281 23 -invalid-', '', 0, 4)[2], '23'
AssertEqual str.trim(' s b '), 's b'
AssertEqual str.trim_start(' s b '), 's b '
AssertEqual str.trim_end(' s b '), ' s b'
AssertEqual str.fill('s b', 10), 's b '
AssertEqual str.fill_middle('s b', 10), ' s b '
AssertEqual str.string2chars(' a b '), [' ', 'a', ' ', 'b', ' ']
AssertEqual str.strAllIndex('hello spacevim hello', 'hello', 0), [[0, 5], [15, 20]]
AssertEqual str.strAllIndex('hello spacevim hello', 'he.*', 1), [[0, 20]]
AssertEqual str.strAllIndex('hello spacevim hello', 'he[^ ]*', 1), [[0, 5], [15, 20]]
AssertEqual str.strAllIndex('let s:cursor_stack[i].end = s:cursor_stack[i].cursor . s:cursor_stack[i].end', 's.cursor[^_]*', 1), [[4, 12], [28, 36], [55, 63]]