Basically, I don’t want to use my arrow keys completely.
But for that to happen the Ctrl-P needs
to have the same functionality in
the command-line as my Up arrow key.
For Example, I type
:so
then I press Up, it turns like so
:source $MYVIMRC
but when I press Ctrl-P, it only goes to the last executed
command
:h camelcasemotion
Can anyone help me with this? It would be much appreciated.
In command mode, <Up> does “move to the previous command in the history that matches the string entered so far”.
In command mode,
CTRL-P has two functions.
Think of it as backward Tab. Most terminals do not distinguish Tab from Shift-Tab, but it and CTRL-P are the same mapping in GUI versions of Vim.
You can remap CTRL-P to be the same as <Up> if you really want to:
You might also want to remap CTRL-N, too: