Last active
April 5, 2017 02:04
-
-
Save carlsmith/010b7f58a51cf9cf06c9b4b1a0df54f2 to your computer and use it in GitHub Desktop.
IPython line magic that adds highlighting to `less` using `pygmentize` - basically a coloured `cat` that scrolls well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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