When I run, for example, ! yarn lint
inside a MacVim. I have this result.
While I run the same command in Terminal's Vim. This is what I get.
Is there any way to make the former colourised as the latter?
So I followed romainl's suggestion and came up with a solution.
First, :terminal ++close yarn format
does colour the terminal result nicely, so I updated my mapping.
map <Leader>l :terminal ++close yarn format<CR>
Then to fix the auto-reload problem. This is what I did.
set autoread
au CursorHold,CursorHoldI * checktime
au FocusGained,BufEnter * :checktime
Thanks to resources from this thread!
https://unix.stackexchange.com/questions/149209/refresh-changed-content-of-file-opened-in-vim