prompt-toolkit / pyvim

Pure Python Vim clone.
BSD 3-Clause "New" or "Revised" License
2.52k stars 161 forks source link

Split windows scroll together #54

Open lunemec opened 9 years ago

lunemec commented 9 years ago

When you :split or :vsplit the same file and scroll in one of them, both splits get scrolled. This should not happen.

lunemec commented 9 years ago

I think the split should behave like another buffer - it should be closeable with :bw or :bd and this is not working. Vim behaves this way.

lunemec commented 9 years ago

Also when you have the same file open in more splits, when you :bd or :bw on either of them, it should close all buffers/splits containing the same file.

jonathanslenders commented 9 years ago

Thanks, i didn't know about the last one. (That they should close together.)

The scrolling together is caused by a limitation in prompt-toolkit. There is only one cursor per file, so if a file is opened in several panes, they share the same cursor. That causes it to scroll together. I'm working on a solution, but that takes some time. (I have to rethink a part of the Buffer data structure, and I prefer to find a way, that it supports multiple cursors, but also large files, line folding, and a few other things.)

lunemec commented 9 years ago

Yes, I'd really appreciate multiple cursor functionality, that is really awesome about sublime text.