Skip to Content
Working with Linux ??? Quick Hacks for the Command Line
book

Working with Linux ??? Quick Hacks for the Command Line

by Petru I»ôfan, Bogdan Vaida
May 2017
Beginner
222 pages
3h 50m
English
Packt Publishing
Content preview from Working with Linux ??? Quick Hacks for the Command Line

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 eof:

Instant configuration restoring
cat > ~/.vimrc << EOF
...
<vimrc content>
...
EOF

Using heredocs ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Basic Linux Terminal Tips and Tricks: Learn to Work Quickly on the Command Line

Basic Linux Terminal Tips and Tricks: Learn to Work Quickly on the Command Line

Philip Kirkbride
Windows Registry Troubleshooting

Windows Registry Troubleshooting

MVP Mike Halsey, MVP Andrew Bettany

Publisher Resources

ISBN: 9781787129184