28 Dec 2016


iTerm 3 has a built in shell script called imgcat for displaying images in the terminal. With one simple autocmd in my vim configuration I can open images*:

:autocmd BufEnter *.png,*.jpg,*gif exec "! ~/.iterm2/imgcat ".expand("%") | :bw

In my command I wipe the image buffer(:bw) because I donโ€™t want large images sitting around in buffers, but this is easy to change.

imgcat

*imgcat does not work with tmux