Reputation: 77
I want <C-b>
move cursor to the last line of screen if the cursor is not at the last line, otherwise, scroll page down.
ps: I know there is an internal variable for cursor position, I'd be grateful if you tell me where to find variables like that.
Upvotes: 2
Views: 457
Reputation: 195089
Assuming that you are talking about "the last line in the window".
You can create an <expr>
mapping to achieve that:
nnoremap <expr> <c-b> line('.')==line('w$')?'<c-f>':'L'
<c-f>
next page, you can also change it into <c-d>
L
, go to the last line in the current window.Upvotes: 2