LoginSignup
1
1

More than 5 years have passed since last update.

vimでquickfixリストに独自エラーを表示させる方法

Last updated at Posted at 2012-12-26
let errors = []

" Errorline(ファイルパス, エラーのライン, エラーのタイプ, エラー文)
call add(errors, Errorline('hogehoge.js', 0, 'Notice', 'ここにエラー文を追加'))

setlocal errorformat=%f:%l:%m
cgetexpr join(errors, "\n")
copen

function! Errorline(file, line, type, txt)
    return a:file.':'.a:line.':[ '.a:type.' ] '.a:txt
endfunction
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1