In Vim you can travel to a given line by entering vim’s command mode and enter that given line’s number there.
I want a specific operation to always take place after moving to a line number in that way.
How do I do that?
This is intended to adjust the screen, by the way.
Normally you enter either of the following in order to jump to line #123 in command mode:
You just need to find a key to map your new command to (I would recommend using the leader key, which was created for exactly this purpose):
Or, you can overwrite the existing key (not recommended, as it might mess up other scripts):