Sunday, September 4, 2016

Re: How to prevent Vim scrolling when splitting a window ?

Could you please post your solution in this thread? I may be useful to someone else. It may be useful to myself on some circumstances.


Em 02/09/2016 12:20, "skywind3000" <skywind3000@gmail.com> escreveu:
skywind3000 wrote:
> Here is a same post on stackoverflow:
> http://stackoverflow.com/questions/12897276/how-to-prevent-vim-scrolling-when-splitting-a-window
>
> nnoremap <C-W>s Hmx`` \|:split<CR>`xzt``
>
> But the solution will get position register 'x' polluted,
> Any better idea to achieve this ?
>
> My eyes need to move up when quickfix window open (horizon split will cause origin window scroll up). and then move down when I close it.
>
> copen/cclose are used frequently in my coding, and my eyes will move up and down
> frequently, that's dizzy.

Okay, found a better solution myself.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment