# HG changeset patch # User Luka Sitas # Date 1761846331 14400 # Node ID 34930197e9d4a22487f006c6eb2969f88d2b6379 # Parent 3017fd33ad8be7eba62e4bb56ac89bf00185189c Updating hg diff tool. Adding support for global searching diff -r 3017fd33ad8b -r 34930197e9d4 .vimrc --- a/.vimrc Tue Oct 28 15:26:12 2025 -0400 +++ b/.vimrc Thu Oct 30 13:45:31 2025 -0400 @@ -2,7 +2,6 @@ map map w :update map q :qall -map g :term gpt set mouse=a inoremap @@ -10,6 +9,8 @@ source $HOME/.vim/plugins/taghelp source $HOME/.vim/plugins/dbtables/dbtables.vim source $HOME/.vim/plugins/hghelp/hghelp.vim +source $HOME/.vim/plugins/globalsearch.vim + let g:db_user = "" " Replace with your default database username let g:db_password = "" " Replace with your default database password @@ -24,6 +25,7 @@ highlight Comment cterm=italic gui=italic autocmd FileType *.blade.php setlocal commentstring=#\ %s +set path+=** set nowrap " Dont wrap set backspace=indent,eol,start " http://vi.stackexchange.com/a/2163 set laststatus=2 " Show status line on startup diff -r 3017fd33ad8b -r 34930197e9d4 plugins/globalsearch.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/globalsearch.vim Thu Oct 30 13:45:31 2025 -0400 @@ -0,0 +1,13 @@ +function! GrepIncludingIgnored(pattern, path = '**/*') + if a:pattern =~ '^/.*/[a-z]*$' + let search_pattern = a:pattern + else + let search_pattern = '/' . a:pattern . '/g' + endif + + execute 'vimgrep ' . search_pattern . ' ' . a:path +endfunction + +" Map it to a command for easy use +command! -nargs=+ GlobalSearch call GrepIncludingIgnored() +command! -nargs=+ GS call GrepIncludingIgnored() diff -r 3017fd33ad8b -r 34930197e9d4 plugins/hghelp/hghelp.vim --- a/plugins/hghelp/hghelp.vim Tue Oct 28 15:26:12 2025 -0400 +++ b/plugins/hghelp/hghelp.vim Thu Oct 30 13:45:31 2025 -0400 @@ -13,18 +13,14 @@ let l:current_file = a:file !=# '' ? a:file : expand('%') let l:filetype = &filetype let l:temp_file = tempname() - execute 'tabnew' - execute 'silent !hg cat -r . ' . l:current_file . ' > ' . l:temp_file - execute 'edit ' . l:temp_file + let l:command = 'hg cat -r . ' . l:current_file . ' > ' . l:temp_file + let result = system(l:command . ' 2>&1') + execute 'tabe ' . l:temp_file execute 'setfiletype' l:filetype setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile execute 'vert diffsplit' l:current_file endfunction - - - - command HGDiff call s:OpenHgDiff(expand('%')) command Commit call s:CommitWithFormat()