It's a paste thing. ZSH is smart enough to recognise when you paste something into the shell and inserts it literally instead of interpreting it as keystrokes (allowing you to insert tabs or newlines into input easily).   @jaherran You need to put unset zle_bracketed_paste in your ~/.zshrc file, and then ZSH will treat newlines in your snippets as if you were pressing ↩.