Let's say I have a file called
# File: ~/hello.py print('Hello') print('Stack Exchange')
I would like to get a screencapture of hello.py when opened in vim editor as the
Needed is a script called
highlighter.sh which can do this.
bash highlighter.sh hello.py # should give hello.png with # syntax highlight # For example when we open hello.py in vim # It gives syntax-highlighted code, I need # screencapture of this tab or window. # In the end of command these tab or window should be closed.
We will have syntax highlighted png files for all the scripts which we can quickview in Mac.
Updates so far
Open the terminal # or, cd ~ vi hello.py cmd t # opens new tab screencapture -l$(osascript -e 'tell app "Terminal" to id of window 1') hello1.png # this captures this command, not the screen of vim tab.