How to edit the same file in multiple tabs in vim? -


i edit long files in vim have blocks of code in multiple disparate places in file need going , forth between. obviously, 1 way of solving split window :split , edit each portion in different split window, , :w in either window save whole file. , if have large enough screen have use vim on low-resolution laptop , don't want reduce screen space further splitting window.

in case, i'd edit file in multiple tabs, , treat each separate tab separate view split. can sort of mimic using :tabopen <the same filename> once have 1 copy of file open, sort of hacky — doesn't work if i've made changes file because vim thinks i'm opening file second time.

is there way behavior want tabs in vim?

the :tab command takes command argument.

so can this:

:tab split 

this work if buffer modified, , save in either tab saves file, updating saved state in both.


Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -