Skip to content

Instantly share code, notes, and snippets.

@carlsmith carlsmith/nyan.py
Last active Apr 5, 2017

Embed
What would you like to do?
IPython line magic that adds highlighting to `less` using `pygmentize` - basically a coloured `cat` that scrolls well.
@line_magic
def nyan(path): os.system("pygmentize -g {0} | less -R".format(path))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.