Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stargate's regexp syntax is not exactly the same as Vim's. #16

Open
VimWei opened this issue Jan 8, 2025 · 0 comments
Open

Stargate's regexp syntax is not exactly the same as Vim's. #16

VimWei opened this issue Jan 8, 2025 · 0 comments

Comments

@VimWei
Copy link

VimWei commented Jan 8, 2025

Stargate's manual: “When {mode} is a string it processed as just vim regexp for search in the current window.”

But stargate's regexp is no exactly same as vim regexp! Stargate allows overlapping matches, which can lead to an excessive number of match results.

Below is my Stargate configuration.

let g:stargate_chars = 'abcdefghijklmnopqrstuvwxyz'
" for the start of a line
noremap <leader>l <Cmd>call stargate#OKvim('\_^')<CR>
" for the end of a line
noremap <leader>$ <Cmd>call stargate#OKvim('$')<CR>
" for Chinese or anytext
noremap <leader><leader>c <Cmd>call stargate#OKvim('.\{10}')<CR>

This screenshot shows the search results in gvim 9 using the pattern /.\{10}
image_2025-01-08_10-42-04

This screenshot displays Stargate's matches using the same regexp, but the results are more numerous than in Vim.
image_2025-01-08_10-43-20

Could you provide a parameter setting to make the match results consistent with Vim's regular expressions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant