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 does not work with tmuxTweet