mirror of
https://github.com/junegunn/vim-easy-align.git
synced 2025-11-09 02:13:49 -05:00
@@ -829,10 +829,11 @@ function! s:valid_regexp(regexp)
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:test_regexp(regexp)
|
function! s:test_regexp(regexp)
|
||||||
if !s:valid_regexp(a:regexp)
|
let regexp = empty(a:regexp) ? @/ : a:regexp
|
||||||
call s:exit('Invalid regular expression: '. a:regexp)
|
if !s:valid_regexp(regexp)
|
||||||
|
call s:exit('Invalid regular expression: '. regexp)
|
||||||
endif
|
endif
|
||||||
return a:regexp
|
return regexp
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
let s:shorthand_regex =
|
let s:shorthand_regex =
|
||||||
|
|||||||
@@ -105,6 +105,14 @@ Expect:
|
|||||||
ap><pl><e;><:;><;b><an><an><a:><:c><ak>e
|
ap><pl><e;><:;><;b><an><an><a:><:c><ak>e
|
||||||
da><ta><;;><ex><ch><an><ge><:;><::><fo> <rm><at
|
da><ta><;;><ex><ch><an><ge><:;><::><fo> <rm><at
|
||||||
|
|
||||||
|
Execute (Use current search pattern as delimiter if empty regular expression is given):
|
||||||
|
/an
|
||||||
|
%EasyAlign*//
|
||||||
|
|
||||||
|
Expect:
|
||||||
|
apple;:;;b an an a::cake
|
||||||
|
data;;exch an ge:;::format
|
||||||
|
|
||||||
Given javascript (json):
|
Given javascript (json):
|
||||||
var jdbc = {
|
var jdbc = {
|
||||||
// JDBC driver for MySQL database:
|
// JDBC driver for MySQL database:
|
||||||
|
|||||||
Reference in New Issue
Block a user