How to run a shell command through vimscript?

command, shell, vim

Solution

`vim` has a a `system()` function:

:call system('date')

Problem

In my Vim setup I'd like to add a configuration that runs a shell command with a certain mapping. Is there any possible way to do this in Vimscript?

Original source