Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions plugin/visual-star-search.vim
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
" search string, vim's search highlight will be wrong. Refactor plz.
function! VisualStarSearchSet(cmdtype,...)
let temp = @"
let starRegisterContent = @*
normal! gvy
if !a:0 || a:1 != 'raw'
let @" = escape(@", a:cmdtype.'\*')
Expand All @@ -15,6 +16,7 @@ function! VisualStarSearchSet(cmdtype,...)
let @/ = substitute(@/, '\~', '\\~', 'g')
let @/ = substitute(@/, '\.', '\\.', 'g')
let @" = temp
let @* = starRegisterContent
endfunction

" replace vim's built-in visual * and # behavior
Expand Down