Pygmentize Styles
2020-07-26
133 words
1 min read
I have recently started using pygmentize for looking at my code in terminal. A very good and native way to do this is to use pygmentize. If you do not know about pygmentize then
Highlight the input file and write the result to
. If no input file is given, use stdin, if -o is not given, use stdout.
So, you can simply pass the script or source code through pygmentize and get a lovely color output with code highlighting in the terminal and this can be very useful.
And you can use different style. You can use the following code to see all the available styles.
|
|
Hope this helps.
Related Articles:
- 2016/01/05 image ordering by Original Date Time using bash script
- 2015/10/15 Get count of lines in scripts (shell)
- 2020/04/20 scripting – performance improvement with file open
- 2019/12/02 i3 – show mapped hotkeys
- 2019/10/10 scan your network with bash IP scan script
Authored By Amit Agarwal
Amit Agarwal, Linux and Photography are my hobbies.Creative Commons Attribution 4.0 International License.