News for hackers. Stuff that matters.
Re:Show HN: Vim Awesome – Vim plugins by codemaster3000 on Thursday June 26, 2014 @09:59PM (#7952445)
This looks awesome! Thanks so much for this. I have a sort of unrelated question that I'd like to ask, since you implemented this so well. On one of my current side projects, I was also trying to implement scrolling by j/k, but couldn't find a nice way to do it. Could you explain how you managed to do it? I have something that works, but it's really jerky, and doesn't accelerate properly like yours does. Thanks again for this awesome site!
Re:Show HN: Vim Awesome – Vim plugins by divad12 on Friday June 27, 2014 @03:30AM (#7953064)
Hi! Glad you like the j/k scrolling.

All it is is a call to `window.scrollTo()` with some logic to determine the position of the element we want to scroll to. See [1] for the code of the actual function that does the scrolling. Is there acceleration? There doesn't seem to be on Chrome for Mac. :/

Oh, if you meant the little arrow ("»") that slides to the right on focus of a plugin, that's just the CSS 3 transition `all 0.1s ease-out` applied to a changing `left` and `opacity`. See [2] for code.

Thanks for checking out the site!

[1]: https://github.com/divad12/vim-awesome/blob/13d576664aa88fe0... [2]: https://github.com/divad12/vim-awesome/blob/13d576664aa88fe0...