vim version: 7.4 huge version.
There will be multiple buffers in use, there will be multiple split windows in one tab, and there will be multiple tabs.
Can multiple buffers in a vim process be searched separately without affecting each other?
Vim’s tab is just a container for display The only thing that really exists is buffer
@Evian gave you suggestions on how to use the BufEnter/BufLeave event Then let me help you complete the code
augroup SearchKeyword autocmd! autocmd BufEnter * let @/ = exists('b:keyword') ? b:keyword : '' autocmd BufLeave * let b:keyword = @/ augroup END
nohlsearch
autocmd
You can write your own plug-in. Logging @/ to a buffer-local variable (b:) on a BufLeave event and doing the opposite on a BufEnter event.
by @evian
Vim’s tab is just a container for display
The only thing that really exists is buffer
@Evian gave you suggestions on how to use the BufEnter/BufLeave event
Then let me help you complete the code
nohlsearch
在autocmd
Invalid, deletedYou can write your own plug-in.
Logging @/ to a buffer-local variable (b:) on a BufLeave event and doing the opposite on a BufEnter event.
by @evian