quickrun の outputter を利用して、Boost.Phoenix のエラーメッセージを見やすくする
前回の続きです。
前回は、syntax + conceal の設定で、namespace を短縮しましたが、今回は quickrun の outputter 内で直接エラーメッセージを置換してみました。
[vim]
" outputter の quickfix をベースに作成 let my_outputter = quickrun#outputter#quickfix#new() function! my_outputter.init(session) " 元の処理を呼び出す call call(quickrun#outputter#quickfix#new().init, [a:session], self) endfunction function! my_outputter.finish(session) let data = self._result " エラーメッセージを適当に置換 let data = substitute(data, "boost::phoenix::detail", "phx_d", "g") let data = substitute(data, "boost::phoenix", "phx", "g") let data = substitute(data, "boost::proto::detail", "prt_d", "g") let data = substitute(data, "boost::proto", "proto", "g") let self._result = data call call(quickrun#outputter#quickfix#new().finish, [a:session], self) endfunction " quickrun に outputter を登録 call quickrun#register_outputter("my_outputter", my_outputter)