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?
ringa_lee2017-05-16 16:41:03
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
Invalid, deleted 伊谢尔伦2017-05-16 16:41:03
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