Getting Started

Installation

Add the following to your Gemfile

gem 'code_snippet'

Or install the gem into your system:

gem install code_snippet

If installed as a system gem, you’ll need to create a template directory and set it in your environment:

mkdir $HOME/Code/templates/snippets

# zshrc
echo '# Code Snippet:' >> $HOME/.zshrc
echo 'export SNIPPET_DIR="$HOME/Code/templates"' >> $HOME/.zshrc

# bashrc
echo '# Code Snippet:' >> $HOME/.bashrc
echo 'export SNIPPET_DIR="$HOME/Code/templates"' >> $HOME/.bashrc