Skip to content

Instantly share code, notes, and snippets.

@vpayno
Last active August 29, 2015 14:07
Show Gist options
  • Save vpayno/b01f9982c0413fd4dcaa to your computer and use it in GitHub Desktop.
Save vpayno/b01f9982c0413fd4dcaa to your computer and use it in GitHub Desktop.
Vimscript Cheat Sheets - Messages

By Victor Payno

Messages

echo

To output a message to the screen type:

:echo "Hello World!"
Hello World!

:echo "Hello" "World!"
Hello World!

These messages are not persisted.

To use the systems echo command use !echo:

:!echo "Hello World!"
Hello World!

echom[sg]

To output a message to the screen and to the message log type:

:echom "Hello World!"
Hello World!

To check the message list type:

:messages
Messages maintainer: Bram Moolenaar <Bram@vim.org>
Hello World!

echon

To output the parameters without anything added in between them use echon.

echon "Hello" "World!"
HelloWorld!

echoe[rr]

echoe[rr] is like echom but it displays an error message instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment