Using pygmentize on Ubuntu view code files

On the terminal, viewing code with colour might improve productivity. You can use pygmentize to view code in colour. Install pygmentize using below commands.

nn

$ sudo apt install python3-pipn$ pip3 install Pygmentsn

nn

You can use view code using:

nn

$ pygmentize -g /etc/profile.d/gawk.shn

nn

If you add an alias like below you will be able to use pygmentize as a short command to your .bashrc or .zshrc.

nn

alias ccat='pygmentize -g 'n

nn

n

Missing Image

n

nn

Tags

nn

    n

  • terminal
  • n

  • Ubuntu
  • n

  • cli
  • n

n

Proudly powered by WordPress

Discover more from Dedunu

Subscribe now to keep reading and get access to the full archive.

Continue reading