annotate plugins/globalsearch.vim @ 18:203279635445
default tip
Adding in the voice note ability. It's not perfect but it is working.
| author |
Luka Sitas <lsitas@avatarasoftware.com> |
| date |
Tue, 16 Dec 2025 11:03:27 -0500 |
| parents |
34930197e9d4 |
| children |
|
| rev |
line source |
|
7
|
1 function! GrepIncludingIgnored(pattern, path = '**/*')
|
|
|
2 if a:pattern =~ '^/.*/[a-z]*$'
|
|
|
3 let search_pattern = a:pattern
|
|
|
4 else
|
|
|
5 let search_pattern = '/' . a:pattern . '/g'
|
|
|
6 endif
|
|
|
7
|
|
|
8 execute 'vimgrep ' . search_pattern . ' ' . a:path
|
|
|
9 endfunction
|
|
|
10
|
|
|
11 " Map it to a command for easy use
|
|
|
12 command! -nargs=+ GlobalSearch call GrepIncludingIgnored(<f-args>)
|
|
|
13 command! -nargs=+ GS call GrepIncludingIgnored(<f-args>)
|