Instant configuration restoring
The configuration we have seen in this chapter might take some time to set up manually, but, once everything is configured, we can create a script that will restore the Vim configuration instantly.
For this, we paste all the commands issued up to now into a bash script that can be run to bring Vim to the exact same configuration. All that is missing from this script is the
vimrc file from the
home folder, which we can also restore through a technique called heredocs. Just type cat, redirect the output to
vimrc, and use heredoc as input, delimited by
cat > ~/.vimrc << EOF ... <vimrc content> ... EOF
Using heredocs ...