Comments (5)
Why would you do that? Splitting windows are usually used for viewing different buffers, not same buffer.
from golden-ratio.
The only purpose for the gif is to demonstrate what I'm talking about. It happens also with different buffers.
from golden-ratio.
I think what you're describing is:
A is visible.
Position cursor on z.
Window switch.
Golden ratio autocmd resizes windows to make first window smaller. Since doing so makes z not visible so view shifts to make z (previous cursor position) visible.
You want A to remain visible. Is that right?
If you disable golden ratio, do the same thing, but use a 10 wincmd +
to increase size of second window, what happens?
from golden-ratio.
Golden ratio autocmd resizes windows to make first window smaller. Since doing so makes z not visible so view shifts to make z (previous cursor position) visible.
You want A to remain visible. Is that right?
No. z should remain visible in this case; the problem is the switch back.
Apparently my gif is actually just confusing things, rather than helping to make it clear. 😢
- Open two windows, the left of which has a long-ish line. Specifically, long enough that with golden-ratio, the shrunken size is longer than the window is wide, but short enough that the expanded size can fit the whole thing.
- Go to the end of that long line (should still see beginning of line in window)
- Switch to right window. The left window shrinks, cutting off the first part of the line.
- Switch to the left window. The text doesn't move; you can't see the beginning of the line, even though there's room for it.
All this said, I've had the autocmd in my vimrc since originally posting the issue, and I actually forgot this was ever a problem. Haven't run into any issues with it.
from golden-ratio.
I think this is native vim behavior.
If you turn off golden-ratio and use vert resize 30
before switching windows, the beginning of the line will no longer be visible (even with sidescrolloff=0
). If you do use vert resize 30
after switching windows, the beginning of the line will be visible until you switch to that window (then vim will adjust the window to show your cursor).
And (what I think is your actual problem), using vert resize 80
after switching to the small window doesn't make the beginning of the line visible even though there's room for it.
Since it's an enhancment and not a bug and it's not pressing for you, I'm closing. Thanks for following up!
from golden-ratio.
Related Issues (20)
- Erratic horizontal sibling resizing behavior HOT 1
- Generating documentation with pathogen yields errors HOT 2
- Sudden resizing of splits when using user commands HOT 2
- Support :verbose in s:toggle_global_golden_ratio to echo current value HOT 2
- Some screenshots would be great to have in the readme. HOT 1
- Always opens in right hand window when using FuzzyFinder HOT 3
- Disable golden ratio for NERDtree HOT 8
- `set wrap` does not work in inactive window/pane/splits HOT 2
- don't expand when focusing on nerdtree? HOT 1
- feature-request: add support for a black list of buffer name patterns HOT 1
- quickfix window height should not exceed its number of lines HOT 1
- Error when using golden-ratio in Vim 8.1 HOT 2
- Even splits when jumping the end splits HOT 2
- Using golden-ratio will confuse nerdtree about the last activated window
- No auto-resize when using liuchengxu/vista.vim
- golden ratio segfaults vim 8.2.150 HOT 1
- E11: Invalid in command-line window; <CR> executes, CTRL-C quits HOT 4
- Focus jumps to last window
- Unknown function: win_gettype HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from golden-ratio.