Chapter 4. Creating Code Snippets

If you like using the command line, but also like some of the features associated with using graphical Integrated Development Environments (IDEs), then this chapter may reveal some new ideas to you. We can create shortcuts for commonly used script elements using the vi or vim text editors from the command line.

In this chapter, we will cover the following topics:

  • Creating abbreviations in .vimrc
  • Reading snippets with vim text editor
  • Using color in terminal

Abbreviations

We have already taken one short sojourn into the ~/.vimrc file and we will now revisit this file to look at abbreviations or abbr controls. This file acts as the run control mechanism for the vim text editor, which is likely to be installed on your Linux ...

Get Mastering Linux Shell Scripting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.