Synchronize lines in cloned window?
-
Hi, is there a Plugin or such function to synchronize lines in a cloned window with word wrap?
For example I am on the left window in line 94 and I want the right window to jump to its line 94.
Thank you!
-
@Igor-Itkin said in Synchronize lines in cloned window?:
synchronize lines in a cloned window with word wrap?
AFAIK no. Actually although you mention “cloned window” your image suggests otherwise. A clone is an exact replica of the original, clearly you have 2 different files open, 1 in each view. So you are just viewing 2 files, one in the “main” view, the other in the “other view”.
I presume you are aware of the “synchronize vertical scrolling” as appears under the “View” menu. Note it mentions vertical scrolling, not lines, which is in essence what you want. So with word wrap on of course the “real” lines will quickly get out of synch. And as you mention word wrap, you probably already know the “synchronize vertical scrolling” will work if word wrap is off in both views.
As a suggestion, if you have a need to keep the “lines” together for purposes of editing or such like, then maybe consider having the 2 files merged. You can opt to put even line numbers at the start of every line for file #1, and odd numbers for file #2. Then merge and sort by line numbers. At the end if you are primarily just wanting the content of 1 file, then by using a “a” and “b” appended to the line numbers you could easily remove the 'a" or “b” lines. Alternatively a regex could grab both lines (in pairs), then just return the first or second line, achieving the same result.
Terry