This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" 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 |