How do I put a command onto the command history without executing it?

To put a command onto the command history without executing it, press the <Esc> key to cancel the command. An alternative solution, is to use the histadd() function like this:

    :call histadd(':', 'echo strftime("%c")')

Comments (1)


Pepsh Pepshinsky

Let’s see you to :help viminfo-file-name (option -i) :set viminfofile=NONE


Speak Your Mind