Mercurial > vim
annotate plugins/globalsearch.vim @ 12:08bdff1abb15
merging heads
| author | luka |
|---|---|
| date | Fri, 28 Nov 2025 08:46:48 -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>) |
