When I open a file Foo.txtin vim and then use :vsplitit so that I can examine its different segments side by side, I notice that if I make any visual selection on the left, vim will select the same text on the right. In addition, if both sides are not lined up when I started the visual selection, which side to which I switch will jump according to the selected one.
I would like to be able to use visual mode to highlight different segments of text on two sides of a split window, or at least to be able to use visual mode to the left, and then to move the cursor to the right. This works fine if the two files are actually different files.
Is there any parameter that would enable this, or is this the only way to make a copy of the file?
Edit: I am expanding the scope of this question to include any vimscript-based solutions since it is not an option that can be installed. If anyone has a good hack to get this behavior, please share. However, I will also be studying autocmd, although this most likely does not match my current knowledge in vimscript.
source
share