My init.vim code:
cd ~/Documents/cp nnoremap <leader>lcd :tabdo lcd %:p:h<cr>
suppose, i have 4 tabs opened in nvim
nvim -p A.cpp B.cpp C.cpp D.cpp
A.cpp B.cpp C.cpp D.cpp
When I need to temporarily change the 4 tab's current directory as the default one,
\lcd changes all the visible tabs to local current directory.
tabdo has a side effect.
It helps to use a specific command in all opened tabs
while doing that, vim goes to the last tab (which i don't want)
So How can i tabdo all buffers without changing the current tab?
I didn't find any simple solution
PS: I've checked some resources.
(1) Windo and restore current window
(2) How to apply a setting in all open tabs and windows?
but didn't find for
tabdo command in 1st resource
tried the 2nd resource code, but it goes to the last tab and removes it & turns it into current buffer
if i have A.cpp opened as current tab, 2nd resource code will do this
A.cpp B.cpp C.cpp A.cpp (removes