I want to remap <PageUp>
to <C-u>
and PageDown
to <C-d>
per the Vim scrolling documentation.
As it stands right now, my /etc/vim/vimrc
looks like this:
nnoremap <PageUp> <C-u>
nnoremap <PageDown> <C-d>
I've tried a lot of different combinations and nothing I've done has worked.
My goal is to make the cursor move to the Start Of File or EOF when holding down PageUp/PageDown. As it is right now, the cursor stops before it gets all the way to the top (and PageDown scrolls past the EOF). Just annoyances I'm trying to fix.
EDIT: The above settings work fine. I was placing my mappings too early in the file.
Instead of placing the mappings into the system-wide /etc/vim/vimrc
, you should put user customizations into the ~/.vimrc
file. Nonetheless, the global configuration (if that's what you want) should work, too. That it doesn't means that the mappings get cleared or redefined. You can check with
:verbose nmap <PageDown>
If it didn't get redefined, you have to hunt for :nunmap
commands in all loaded scripts (:scriptnames
), or capture a log with vim -V20vimlog
.
What about the following mappings?
nnoremap <PageUp> gg
nnoremap <PageDown> G
Or simply using gg
and G
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With