Skip to content

Instantly share code, notes, and snippets.

@minego
minego / .vimrc
Last active August 29, 2015 14:07 — forked from anonymous/.vimrc
lint
" Call a lint script on write, it will call the appropriate lint tool for the
" file type. Show the results in the quickfix window.
function! Lint()
let current_file = shellescape(expand('%:p'))
let output = system('lint ' . current_file)
if strlen(output) > 0
" write quickfix errors to a temp file
let quickfix_tmpfile_name = tempname()
exe "redir! > " . quickfix_tmpfile_name